mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-05 02:34:18 +00:00
77f52bb6a8
debian/bootstrap.sh: * only build one of freeswitch-sysvinit or freeswitch-systemd * squeeze is removed from supported releases * added stretch to supported releases * avoid_mods_wheezy extended to modules which fail to build on wheezy * use systemd by default for future distros * new command-line option -v to enforce sysvinit * added dependency on dh-systemd for systemd-powered distros * freeswitch-init is now a virtual package * freeswitch-sysvinit and freeswitch-systemd are set to conflict with each other debian/freeswitch.postinst: * no need to call systemctl explicitly. dh-systemd does it in a standard way debian/rules: * integrated dh-systemd in override_dh_installinit debian/freeswitch-systemd.freeswitch.default renamed to freeswitch-sysvinit.freeswitch.default: * /etc/default/freeswitch is not installed by freeswitch-systemd, but still respected if there is a need to modify the startup options debian/freeswitch-systemd.freeswitch.service: * proper expansion of DAEMON_OPTS
51 lines
1.2 KiB
Bash
51 lines
1.2 KiB
Bash
#!/bin/sh
|
|
set -e
|
|
|
|
case "$1" in
|
|
configure)
|
|
if ! getent group freeswitch >/dev/null; then
|
|
groupadd --system freeswitch
|
|
fi
|
|
if ! getent passwd freeswitch >/dev/null; then
|
|
useradd --system -g freeswitch -Gaudio \
|
|
-d /var/lib/freeswitch \
|
|
-s /bin/false \
|
|
-e '' \
|
|
-c 'FreeSWITCH' \
|
|
freeswitch
|
|
fi
|
|
for x in \
|
|
/var/lib/freeswitch \
|
|
/var/lib/freeswitch/db \
|
|
/var/lib/freeswitch/recordings \
|
|
/var/lib/freeswitch/storage \
|
|
/var/log/freeswitch \
|
|
/var/run/freeswitch;
|
|
do
|
|
if ! test -d $x; then
|
|
mkdir -p $x
|
|
chown freeswitch:freeswitch $x
|
|
chmod o-rwx,g+u $x
|
|
fi
|
|
chown freeswitch $x
|
|
done
|
|
if [ ! -d "/etc/freeswitch" ]; then
|
|
mkdir -p /etc/freeswitch/
|
|
cp -a /usr/share/freeswitch/conf/vanilla/* /etc/freeswitch/
|
|
fi
|
|
if [ ! -d "/etc/freeswitch/tls" ]; then
|
|
mkdir -p /etc/freeswitch/tls/
|
|
chown freeswitch:freeswitch /etc/freeswitch/tls
|
|
fi
|
|
;;
|
|
abort-upgrade|abort-remove|abort-deconfigure)
|
|
;;
|
|
*)
|
|
echo "postinst called with unknown argument \`$1'" >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
#DEBHELPER#
|
|
exit 0
|