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

47 lines
805 B
Bash
Raw Normal View History

#!/bin/sh
#move to script directory so all relative paths work
cd "$(dirname "$0")"
#includes
. ./config.sh
2017-04-24 23:35:01 +02:00
#install the package
2017-04-25 01:19:55 +02:00
if [ .$switch_source = ."package" ]; then
2017-04-24 23:35:01 +02:00
#run the package install
switch/package-release.sh
#copy the switch conf files
2017-04-25 10:46:36 +02:00
switch/package-copy.sh
2017-04-24 23:35:01 +02:00
#set the file permissions
switch/package-permissions.sh
fi
#install from source
2017-04-25 01:19:55 +02:00
if [ .$switch_source = ."source" ]; then
2017-04-24 23:35:01 +02:00
#compile the source
if [ ."$switch_branch" = "master" ]; then
switch/source-master.sh
else
switch/source-release.sh
fi
#copy the switch conf files
2017-04-25 10:46:36 +02:00
switch/source-copy.sh
#set the file permissions
switch/source-permissions.sh
fi
2017-06-24 19:54:14 +02:00
2017-06-24 20:52:01 +02:00
#restart the service
service freeswitch restart
2017-06-24 19:54:14 +02:00
2017-06-25 02:39:50 +02:00
#waiting to start
2017-06-25 02:40:58 +02:00
echo "Allow time for FreeSWITCH to start";
2017-06-26 04:58:06 +02:00
for i in `seq 1 3`; do
2017-06-25 02:39:50 +02:00
echo $i
sleep 1
done