diff --git a/devuan/resources/switch/etc.default.freeswitch b/devuan/resources/switch/etc.default.freeswitch new file mode 100644 index 0000000..e98a435 --- /dev/null +++ b/devuan/resources/switch/etc.default.freeswitch @@ -0,0 +1,2 @@ +# /etc/default/freeswitch +DAEMON_OPTS="-nonat -scripts /var/www/fusionpbx/app/scripts/resources/scripts/" diff --git a/devuan/resources/switch/source/freeswitch.init b/devuan/resources/switch/freeswitch.init similarity index 93% rename from devuan/resources/switch/source/freeswitch.init rename to devuan/resources/switch/freeswitch.init index 2ef5b5e..2b81a4c 100755 --- a/devuan/resources/switch/source/freeswitch.init +++ b/devuan/resources/switch/freeswitch.init @@ -2,10 +2,10 @@ ### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*- ### BEGIN INIT INFO # Provides: freeswitch -# Required-Start: $network $remote_fs $local_fs -# Required-Stop: $network $remote_fs $local_fs -# Should-Start: postgresql mysql memcached mongodb -# Should-Stop: postgresql mysql memcached mongodb +# Required-Start: $network $remote_fs $local_fs postgresql +# Required-Stop: $network $remote_fs $local_fs postgresql +# Should-Start: mysql memcached mongodb +# Should-Stop: mysql memcached mongodb # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: FreeSWITCH Softswitch @@ -18,7 +18,7 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin DESC=freeswitch NAME=freeswitch DAEMON=/usr/bin/freeswitch -USER=freeswitch +USER=www-data DAEMON_ARGS="-u $USER -ncwait" CONFDIR=/etc/$NAME RUNDIR=/var/run/$NAME @@ -130,4 +130,4 @@ case "$1" in ;; esac -exit 0 \ No newline at end of file +exit 0 diff --git a/devuan/resources/switch/package-sysvinit.sh b/devuan/resources/switch/package-sysvinit.sh index 31daee1..cdc838a 100755 --- a/devuan/resources/switch/package-sysvinit.sh +++ b/devuan/resources/switch/package-sysvinit.sh @@ -1,6 +1,5 @@ -update-rc.d freeswitch enable -# -# If freeswitch is not restarted with the new config before finish.sh is run, -# upgrade_domains.php will not set the paths correctly on the default domain -# -service freeswitch restart \ No newline at end of file +cp "$(dirname $0)/freeswitch.init" /etc/init.d/freeswitch +cp "$(dirname $0)/etc.default.freeswitch" /etc/default/freeswitch + +/usr/sbin/update-rc.d freeswitch enable +/usr/sbin/service freeswitch restart diff --git a/devuan/resources/switch/source-sysvinit.sh b/devuan/resources/switch/source-sysvinit.sh index bfc4ebb..cdc838a 100755 --- a/devuan/resources/switch/source-sysvinit.sh +++ b/devuan/resources/switch/source-sysvinit.sh @@ -1,6 +1,5 @@ -cp "$(dirname $0)/source/freeswitch.init" /etc/init.d/freeswitch -cp "$(dirname $0)/source/etc.default.freeswitch" /etc/default/freeswitch -update-rc.d freeswitch enable -service freeswitch restart +cp "$(dirname $0)/freeswitch.init" /etc/init.d/freeswitch +cp "$(dirname $0)/etc.default.freeswitch" /etc/default/freeswitch -echo "Please configure the sysvinit start up script from the source dir, test, and contribute code. Thank you." \ No newline at end of file +/usr/sbin/update-rc.d freeswitch enable +/usr/sbin/service freeswitch restart diff --git a/devuan/resources/switch/source/etc.default.freeswitch b/devuan/resources/switch/source/etc.default.freeswitch deleted file mode 100755 index e4d275f..0000000 --- a/devuan/resources/switch/source/etc.default.freeswitch +++ /dev/null @@ -1,8 +0,0 @@ -# /etc/default/freeswitch -FS_USER="www-data" -FS_GROUP="www-data" -DAEMON_OPTS="-nonat -ncwait -u www-data -g www-data -run /var/run/freeswitch" - -# this is the packaged version. But since the source install does not work. I've not tested any of this. -# /etc/default/freeswitch -#DAEMON_OPTS="-nonat" \ No newline at end of file