]>
git.ipfire.org Git - thirdparty/freeswitch.git/blob - build/fs_ivrd.init.redhat
3 # /etc/rc.d/init.d/fs_ivrd
5 # The FreeSwitch Open Source Voice Platform
8 # description: Starts and stops the fs_ivrd server daemon
10 # pidfile: /usr/local/fs_ivrd/run/fs_ivrd.pid
13 # Source function library.
14 .
/etc
/init.d
/functions
17 PID_FILE
=${PID_FILE-/usr/local/freeswitch/run/fs_ivrd.pid}
18 #FS_USER=${FS_USER-freeswitch}
19 FS_USER
=${FS_USER-root}
20 FS_FILE
=${FS_FILE-/usr/local/freeswitch/bin/fs_ivrd}
21 FS_HOME
=${FS_HOME-/usr/local/freeswitch}
22 LOCK_FILE
=/var
/lock
/subsys
/fs_ivrd
23 IVRD_ARGS
="-h localhost -p 9090"
27 if [ -f /etc
/sysconfig
/fs_ivrd
]; then
28 .
/etc
/sysconfig
/fs_ivrd
31 # <define any local shell functions used by the code that follows>
34 echo -n "Starting $PROG_NAME: "
35 if [ -e $LOCK_FILE ]; then
36 if [ -e $PID_FILE ] && [ -e /proc
/`cat $PID_FILE` ]; then
38 echo -n $
"$PROG_NAME is already running.";
39 failure $
"$PROG_NAME is already running.";
45 daemon
--user $FS_USER --pidfile $PID_FILE "$FS_FILE $IVRD_ARGS $IVRD_PARAMS >/dev/null 2>&1 &"
48 [ $RETVAL -eq 0 ] && touch $LOCK_FILE;
54 echo -n "Shutting down $PROG_NAME: "
55 if [ ! -e $LOCK_FILE ]; then
57 echo -n $
"cannot stop $PROG_NAME: $PROG_NAME is not running."
58 failure $
"cannot stop $PROG_NAME: $PROG_NAME is not running."
63 $FS_FILE -stop > /dev
/null
2>&1
67 [ $RETVAL -eq 0 ] && rm -f $LOCK_FILE;
91 # <cause the service configuration to be reread, either with
92 # kill -HUP or by restarting the daemons, in a manner similar
98 echo "Usage: $PROG_NAME {start|stop|status|restart}"