Create rc.d.event_guard
This commit is contained in:
parent
587c184ea8
commit
54b605d3d2
|
|
@ -0,0 +1,27 @@
|
||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# PROVIDE: FusionPBX
|
||||||
|
# REQUIRE: LOGIN cleanvar
|
||||||
|
# KEYWORD: shutdown
|
||||||
|
#
|
||||||
|
# Add the following lines to /etc/rc.conf to enable freeswitch:
|
||||||
|
# event_guard_enable: Set it to "YES" to enable freeswitch.
|
||||||
|
# Default is "NO".
|
||||||
|
#
|
||||||
|
. /etc/rc.subr
|
||||||
|
name="event_guard"
|
||||||
|
rcvar=${name}_enable
|
||||||
|
load_rc_config $name
|
||||||
|
: ${event_guard_enable="NO"}
|
||||||
|
: ${event_guard_pidfile="/var/run/event_guard.pid"}
|
||||||
|
start_cmd=${name}_start
|
||||||
|
stop_cmd=${name}_stop
|
||||||
|
status_cmd=${name}_status
|
||||||
|
pidfile=${event_guard_pidfile}
|
||||||
|
event_guard_start() {
|
||||||
|
/usr/local/bin/php /usr/local/www/fusionpbx/app/event_guard/resources/service/event_guard.php &
|
||||||
|
}
|
||||||
|
event_guard_stop() {
|
||||||
|
/usr/local/bin/php /usr/local/www/fusionpbx/app/event_guard/resources/service/event_guard.php -stop
|
||||||
|
}
|
||||||
|
run_rc_command "$1"
|
||||||
Loading…
Reference in New Issue