fusionpbx-install.sh/freebsd/resources/switch/rc.d.freeswitch

35 lines
992 B
Plaintext
Raw Normal View History

2017-03-25 19:39:05 +01:00
#!/bin/sh
#
# PROVIDE: freeswitch
# REQUIRE: LOGIN cleanvar
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable freeswitch:
# freeswitch_enable: Set it to "YES" to enable freeswitch.
# Default is "NO".
# freeswitch_flags: Flags passed to freeswitch-script on startup.
# Default is "".
#
. /etc/rc.subr
name="freeswitch"
rcvar=${name}_enable
load_rc_config $name
: ${freeswitch_enable="NO"}
: ${freeswitch_pidfile="/usr/local/freeswitch/run/freeswitch.pid"}
start_cmd=${name}_start
stop_cmd=${name}_stop
2017-06-24 20:47:54 +02:00
reload_cmd=${name}_reload
status_cmd=${name}_status
2017-03-25 19:39:05 +01:00
pidfile=${freeswitch_pidfile}
freeswitch_start() {
/usr/local/freeswitch/bin/freeswitch ${freeswitch_flags}
}
freeswitch_stop() {
2017-06-24 20:47:54 +02:00
/usr/local/freeswitch/bin/freeswitch -stop
}
freeswitch_reload() {
2017-03-25 19:39:05 +01:00
/usr/local/freeswitch/bin/freeswitch -stop
2017-06-24 20:47:54 +02:00
/usr/local/freeswitch/bin/freeswitch ${freeswitch_flags}
2017-03-25 19:39:05 +01:00
}
run_rc_command "$1"