fusionpbx-install.sh/freebsd/resources/switch/package-release.sh

41 lines
986 B
Bash
Raw Normal View History

2017-04-24 23:15:03 +02:00
#!/bin/sh
#move to script directory so all relative paths work
cd "$(dirname "$0")"
#includes
. ../config.sh
2017-04-25 02:47:18 +02:00
#install dependencies
pkg install --yes tiff memcached
2017-04-24 23:15:03 +02:00
#set the current working directory
cwd=$(pwd)
#send a message
echo "Installing the FreeSWITCH package"
2018-05-24 07:48:26 +02:00
#get the package
cd /usr/src && fetch https://www.fusionpbx.com/downloads/freebsd11/freeswitch-pgsql10-1.6.19_2.txz
2017-04-24 23:15:03 +02:00
#install the package
2018-05-24 07:48:26 +02:00
#pkg install --yes freeswitch
2018-05-24 08:26:20 +02:00
pkg install --yes /usr/src/freeswitch-pgsql10-1.6.19_2.txz
2017-04-24 23:15:03 +02:00
#set the original working directory
cd $cwd
#configure system service
2017-04-25 02:47:18 +02:00
#cp "$(dirname $0)/rc.d.freeswitch" /usr/local/etc/rc.d/freeswitch
#chmod u-w,ugo+x /usr/local/etc/rc.d/freeswitch
2017-04-24 23:15:03 +02:00
2017-04-25 02:47:18 +02:00
#enable the services
echo 'memcached_enable="YES"' >> /etc/rc.conf
2017-04-24 23:15:03 +02:00
echo 'freeswitch_enable="YES"' >> /etc/rc.conf
2017-04-25 02:47:18 +02:00
echo 'freeswitch_flags="-nonat"' >> /etc/rc.conf
echo 'freeswitch_user="www"' >> /etc/rc.conf
echo 'freeswitch_group="www"' >> /etc/rc.conf
2017-04-24 23:15:03 +02:00
2017-04-25 10:32:13 +02:00
#start the service
2017-04-25 02:47:18 +02:00
service memcached start