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

40 lines
967 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 ghostscript10-10.02.1 memcached sox
2017-04-25 02:47:18 +02:00
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
if [ .$switch_source = ."package" ]; then
pkg install --yes freeswitch
fi
if [ .$switch_source = ."port" ]; then
#dbatch uses the defaults alternative is make config-recursive
2020-05-20 21:12:47 +02:00
cd /usr/ports/net/freeswitch/ && make -DBATCH install clean
fi
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
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_username="www"' >> /etc/rc.conf
echo 'freeswitch_groupname="www"' >> /etc/rc.conf
2017-04-24 23:15:03 +02:00