FS-8948 #resolve Handle non-existent config in Debian postinst
When the "freeswitch" package was installed directly on Debian, i.e. without one of the meta packages pulling in the vanilla configuration (freeswitch-conf-vanilla), the "postinst" script failed: $ apt-get install freeswitch … Setting up freeswitch (1.6.6~13~d2d0b32-1~jessie+1) ... cp: cannot stat ‘/usr/share/freeswitch/conf/vanilla/*’: No such file or directory … With this change the code tests for "freeswitch.xml" before attempting to copy the configuration files.
This commit is contained in:
parent
a107910907
commit
3b4b839ed4
|
@ -31,8 +31,10 @@ case "$1" in
|
||||||
done
|
done
|
||||||
if [ ! -d "/etc/freeswitch" ]; then
|
if [ ! -d "/etc/freeswitch" ]; then
|
||||||
mkdir -p /etc/freeswitch/
|
mkdir -p /etc/freeswitch/
|
||||||
|
if [ -e /usr/share/freeswitch/conf/vanilla/freeswitch.xml ]; then
|
||||||
cp -a /usr/share/freeswitch/conf/vanilla/* /etc/freeswitch/
|
cp -a /usr/share/freeswitch/conf/vanilla/* /etc/freeswitch/
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
if [ ! -d "/etc/freeswitch/tls" ]; then
|
if [ ! -d "/etc/freeswitch/tls" ]; then
|
||||||
mkdir -p /etc/freeswitch/tls/
|
mkdir -p /etc/freeswitch/tls/
|
||||||
chown freeswitch:freeswitch /etc/freeswitch/tls
|
chown freeswitch:freeswitch /etc/freeswitch/tls
|
||||||
|
|
Loading…
Reference in New Issue