2 getent group freeswitch > /dev/null
4 echo 'Adding group freeswitch'
7 id freeswitch > /dev/null
9 echo 'Adding user freeswitch'
10 useradd -r freeswitch -g freeswitch
15 echo "FreeSWITCH is installed!"
16 echo "<<<WARNING>>> You MUST change the default_password in /etc/freeswitch/vars.xml
17 Failure to do so will leave your default extension 1000 vulnerable"
18 echo "FreeSWITCH's default configuration is available in
19 /usr/share/doc/freeswitch/examples/conf.default, with this package's modified
20 version in /usr/share/doc/freeswitch/examples/conf.archlinux"
25 if [ -d /etc/freeswitch -a ! -L /etc/freeswitch ];then
26 echo "Moving your old configs (/etc/freeswitch) to /usr/share/freeswitch/conf/local"
27 mv /etc/freeswitch /usr/share/freeswitch/conf/local
28 ln -s /usr/share/freeswitch/conf/local /etc/freeswitch
30 [ -d /usr/share/freeswitch/conf/pbx ] || cp -a /usr/share/doc/freeswitch/examples/conf.archlinux/ /usr/share/freeswitch/conf/pbx
31 chown -R freeswitch:freeswitch /usr/share/freeswitch/conf/pbx
32 if [ ! -L /etc/freeswitch ];then
33 echo "Linking /usr/share/freeswitch/conf/pbx to /etc/freeswitch"
34 ln -s /usr/share/freeswitch/conf/pbx /etc/freeswitch
36 chown -R freeswitch:freeswitch /var/{run,spool,log}/freeswitch
37 chown -R freeswitch:freeswitch /etc/sv/freeswitch
38 echo "The running configuration directory is symlinked as /etc/freeswitch"
40 echo "FreeSWITCH can be started with rc.d freeswitch start or /etc/sv/freeswitch/run"
41 echo "To start on boot add freeswitch to /etc/rc.conf or supervise the /etc/sv/freeswitch directory"
46 echo "Not removing /usr/share/freeswitch/conf/ config directories!! If you do not want to keep them, rm -rf them away"
48 getent group freeswitch &> /dev/null && groupdel freeswitch
52 # vim:set ts=2 sw=2 et: