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"
|
|
|
|
|
|
|
|
|
|
#install the package
|
2017-04-25 06:44:51 +02:00
|
|
|
pkg install --yes freeswitch
|
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 02:55:01 +02:00
|
|
|
#start the services
|
2017-04-25 02:47:18 +02:00
|
|
|
service memcached start
|
|
|
|
|
service freeswitch start
|