7 .
/etc
/conf.d
/$daemon_name
9 pidof
-o %PPID
$daemon_name
14 stat_busy
"Starting $daemon_name daemon in the foreground"
17 exec su
-c "/usr/bin/freeswitch $FREESWITCH_OPTS -nf" freeswitch
20 stat_busy
"Starting $daemon_name daemon"
23 if [ -z "$PID" ]; then
24 [ -f /var
/run
/$daemon_name.pid
] && rm -f /var
/run
/$daemon_name.pid
27 su
-c "/usr/bin/freeswitch $FREESWITCH_OPTS" freeswitch
33 echo $
(get_pid
) > /var
/run
/$daemon_name.pid
34 add_daemon
$daemon_name
44 stat_busy
"Stopping $daemon_name daemon"
47 [ ! -z "$PID" ] && kill $PID &> /dev
/null
53 rm -f /var
/run
/$daemon_name.pid
&> /dev
/null
54 rm_daemon
$daemon_name
66 stat_busy
"Checking $daemon_name status";
67 ck_status
$daemon_name
72 echo "usage: $0 {start|stop|restart|status|fgstart}"