Files
fusionpbx-install.sh/debian/resources/switch/source-to-package.sh
T

25 lines
746 B
Bash
Raw Normal View History

#!/bin/sh
2016-08-23 01:08:34 +00:00
#make sure the etc fusionpbx directory exists
2016-08-23 00:58:46 +00:00
mkdir -p /etc/fusionpbx
2016-08-23 01:08:34 +00:00
#remove init.d startup script
mv /etc/init.d/freeswitch /usr/src/init.d.freeswitch
update-rc.d -f freeswitch remove
#add the the freeswitch package
2016-08-23 00:58:46 +00:00
$(dirname $0)/package-release.sh
2016-08-23 01:08:34 +00:00
#install freeswitch systemd.d
2016-08-23 00:58:46 +00:00
$(dirname $0)/package-systemd.sh
2016-08-23 01:08:34 +00:00
2016-08-23 01:52:34 +00:00
#update fail2ban
sed -i /etc/fail2ban/jail.local -e s:'/usr/local/freeswitch/log:/var/log/freeswitch:'
sytemctl restart fail2ban
#move source files to package directories
2017-01-27 20:59:39 -07:00
rsync -avz /usr/local/freeswitch/conf/* /etc/freeswitch
rsync -avz /usr/local/freeswitch/recordings /var/lib/freeswitch
rsync -avz /usr/local/freeswitch/storage /var/lib/freeswitch
rsync -avz /usr/local/freeswitch/scripts /usr/share/freeswitch