Create rc.d.event_guard

This commit is contained in:
FusionPBX 2024-08-26 11:48:04 -06:00 committed by GitHub
parent 587c184ea8
commit 54b605d3d2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 27 additions and 0 deletions

View File

@ -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"