[Freeswitch-svn] [commit] r12084 - freeswitch/trunk/build

FreeSWITCH SVN cypromis at freeswitch.org
Tue Feb 17 01:40:32 PST 2009


Author: cypromis
Date: Tue Feb 17 03:40:32 2009
New Revision: 12084

Log:
make settings in init file configurable for people that compile freeswitch by hand


Modified:
   freeswitch/trunk/build/freeswitch.init.redhat

Modified: freeswitch/trunk/build/freeswitch.init.redhat
==============================================================================
--- freeswitch/trunk/build/freeswitch.init.redhat	(original)
+++ freeswitch/trunk/build/freeswitch.init.redhat	Tue Feb 17 03:40:32 2009
@@ -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 @@
                 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 @@
             echo
             return 1;
         fi
+	cd $FS_HOME
 	$FS_FILE -stop > /dev/null 2>&1
         killproc $PROG_NAME
 	RETVAL=$?



More information about the Freeswitch-svn mailing list