git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7932 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2008-03-19 17:37:18 +00:00
parent f75927e4d9
commit a686c77596

View File

@ -11,7 +11,6 @@
# pidfile: /opt/freeswitch/log/freeswitch.pid # pidfile: /opt/freeswitch/log/freeswitch.pid
# #
export PATH=$PATH:/opt/freeswitch/bin
# Source function library. # Source function library.
. /etc/init.d/functions . /etc/init.d/functions
@ -25,6 +24,7 @@ PID_FILE=/opt/freeswitch/log/freeswitch.pid
FS_USER=freeswitch FS_USER=freeswitch
FS_FILE=/opt/freeswitch/bin/freeswitch FS_FILE=/opt/freeswitch/bin/freeswitch
LOCK_FILE=/var/lock/subsys/freeswitch LOCK_FILE=/var/lock/subsys/freeswitch
FREESWITCH_ARGS="-nc"
RETVAL=0 RETVAL=0
# <define any local shell functions used by the code that follows> # <define any local shell functions used by the code that follows>
@ -32,7 +32,7 @@ RETVAL=0
start() { start() {
echo -n "Starting $PROG_NAME: " echo -n "Starting $PROG_NAME: "
if [ -e $LOCK_FILE ]; then if [ -e $LOCK_FILE ]; then
if [ -e $PID_FILE ] && [ -e /proc/`$PID_FILE` ]; then if [ -e $PID_FILE ] && [ -e /proc/`cat $PID_FILE` ]; then
echo echo
echo -n $"$PROG_NAME is already running."; echo -n $"$PROG_NAME is already running.";
failure $"$PROG_NAME is already running."; failure $"$PROG_NAME is already running.";
@ -41,10 +41,11 @@ start() {
fi fi
fi fi
daemon --user $FS_USER --pidfile $PID_FILE "$FS_FILE $FREESWITCH_PARAMS >/dev/null 2>&1" daemon --user $FS_USER --pidfile $PID_FILE "$FS_FILE $FREESWITCH_ARGS $FREESWITCH_PARAMS >/dev/null 2>&1"
echo echo
RETVAL=$? RETVAL=$?
[ $RETVAL -eq 0 ] && touch $LOCK_FILE; [ $RETVAL -eq 0 ] && touch $LOCK_FILE;
echo
return $RETVAL return $RETVAL
} }