You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

41 lines
971 B

#!/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 \
/etc/kazoo/freeswitch \
/etc/kazoo/freeswitch/autoload_configs \
/etc/kazoo/freeswitch/certs \
/etc/kazoo/freeswitch/chatplan \
/etc/kazoo/freeswitch/dialplan \
/etc/kazoo/freeswitch/directory \
/etc/kazoo/freeswitch/scripts \
/etc/kazoo/freeswitch/sip_profiles;
do
mkdir -p $x
chown -R freeswitch:freeswitch $x
chmod -R o-wx,g+u $x
done
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
#DEBHELPER#
exit 0