forked from norman/fusionpbx-install.sh-github-mirror
* Changing default domain name to hostname, setting default PostgreSQL version to 15 * Adding support for PostgreSQL 14 and 15 * Correcting user and group options for freeswitch runtime * Copying missing resources/fail2ban/freeswitch-dos.conf from debian dir, adding missing copy of sip-auth-challenge-ip.conf and sip-auth-challenge.conf, setting default setting for allowipv6 directive * Remove freeswitch database and user Reason for this change is if FreeSWITCH uses the PostgreSQL then its a good idea for it to use its own instance. This is to prevent blocking FreeSWITCH from accessing the database if there is a long running Query on the FusionPBX database * Changing default domain name to hostname, setting default PostgreSQL version to 15 * Adding support for PostgreSQL 14 and 15 * Correcting user and group options for freeswitch runtime * Copying missing resources/fail2ban/freeswitch-dos.conf from debian dir, adding missing copy of sip-auth-challenge-ip.conf and sip-auth-challenge.conf, setting default setting for allowipv6 directive --------- Co-authored-by: Charlie Root <root@sjcacs-test.gadallah.net>
43 lines
1.0 KiB
Bash
Executable File
43 lines
1.0 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
#move to script directory so all relative paths work
|
|
cd "$(dirname "$0")"
|
|
|
|
#includes
|
|
. ../config.sh
|
|
|
|
#install dependencies
|
|
pkg install --yes tiff ghostscript10-10.02.1 memcached sox
|
|
|
|
#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
|
|
cd /usr/ports/net/freeswitch/ && make -DBATCH install clean
|
|
fi
|
|
|
|
#set the original working directory
|
|
cd $cwd
|
|
|
|
#configure system service
|
|
#cp "$(dirname $0)/rc.d.freeswitch" /usr/local/etc/rc.d/freeswitch
|
|
#chmod u-w,ugo+x /usr/local/etc/rc.d/freeswitch
|
|
|
|
#enable the services
|
|
echo 'memcached_enable="YES"' >> /etc/rc.conf
|
|
echo 'freeswitch_enable="YES"' >> /etc/rc.conf
|
|
echo 'freeswitch_flags="-nonat"' >> /etc/rc.conf
|
|
echo 'freeswitch_username="www"' >> /etc/rc.conf
|
|
echo 'freeswitch_groupname="www"' >> /etc/rc.conf
|
|
|
|
#start the service
|
|
service memcached start
|