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
|
2024-01-03 22:06:57 +01:00
|
|
|
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
|
2020-11-16 03:16:51 +01:00
|
|
|
if [ .$switch_source = ."package" ]; then
|
|
|
|
|
pkg install --yes freeswitch
|
|
|
|
|
fi
|
|
|
|
|
if [ .$switch_source = ."port" ]; then
|
2020-05-20 21:18:25 +02:00
|
|
|
#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
|
2020-05-20 20:21:39 +02:00
|
|
|
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
|
2024-01-03 22:06:57 +01:00
|
|
|
echo 'freeswitch_username="www"' >> /etc/rc.conf
|
|
|
|
|
echo 'freeswitch_groupname="www"' >> /etc/rc.conf
|
2017-04-24 23:15:03 +02:00
|
|
|
|