From ec4b9f003a589f57f794eae1f86b1ebb4dfa37f8 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sat, 1 Apr 2017 01:48:01 -0600 Subject: [PATCH] Update source-release.sh --- freebsd/resources/switch/source-release.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/freebsd/resources/switch/source-release.sh b/freebsd/resources/switch/source-release.sh index 8c4715b..f37d1d0 100755 --- a/freebsd/resources/switch/source-release.sh +++ b/freebsd/resources/switch/source-release.sh @@ -6,6 +6,9 @@ cd "$(dirname "$0")" #includes . ../config.sh +#set the current working directory +cwd=$(pwd) + #send a message echo "Installing the FreeSWITCH source" @@ -21,7 +24,6 @@ rehash #get the source git clone -b v1.6 https://freeswitch.org/stash/scm/fs/freeswitch.git /usr/src/freeswitch -cd /usr/src/freeswitch #prepare the source cd /usr/src/freeswitch && /bin/sh /usr/src/freeswitch/bootstrap.sh -j @@ -49,9 +51,12 @@ gmake uhd-sounds-install uhd-sounds-install mkdir -p /usr/local/freeswitch/sounds/music/default mv /usr/local/freeswitch/sounds/music/*000 /usr/local/freeswitch/sounds/music/default +#set the original working directory +cd $cwd + #configure system service ln -s /usr/local/freeswitch/bin/fs_cli /usr/bin/fs_cli -cp switch/rc.d.freeswitch /usr/local/etc/rc.d/freeswitch +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 service