From 3f2a45ee55fdb1da228b5b0b311284db7dbe0bb8 Mon Sep 17 00:00:00 2001 From: Michal Bielicki Date: Tue, 17 Feb 2009 09:40:32 +0000 Subject: [PATCH] make settings in init file configurable for people that compile freeswitch by hand git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12084 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- build/freeswitch.init.redhat | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/build/freeswitch.init.redhat b/build/freeswitch.init.redhat index 7f676ff40b..cf7b698d07 100644 --- a/build/freeswitch.init.redhat +++ b/build/freeswitch.init.redhat @@ -15,9 +15,10 @@ . /etc/init.d/functions PROG_NAME=freeswitch -PID_FILE=/opt/freeswitch/log/freeswitch.pid -FS_USER=freeswitch -FS_FILE=/opt/freeswitch/bin/freeswitch +PID_FILE=${PID_FILE-/opt/freeswitch/log/freeswitch.pid} +FS_USER=${FS_USER-freeswitch} +FS_FILE=${FS_FILE-/opt/freeswitch/bin/freeswitch} +FS_HOME=${FS_HOME-/opt/freeswitch} LOCK_FILE=/var/lock/subsys/freeswitch FREESWITCH_ARGS="-nc" RETVAL=0 @@ -40,7 +41,7 @@ start() { return 1 fi fi - + cd $FS_HOME daemon --user $FS_USER --pidfile $PID_FILE "$FS_FILE $FREESWITCH_ARGS $FREESWITCH_PARAMS >/dev/null 2>&1" echo RETVAL=$? @@ -58,6 +59,7 @@ stop() { echo return 1; fi + cd $FS_HOME $FS_FILE -stop > /dev/null 2>&1 killproc $PROG_NAME RETVAL=$?