1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-01 01:17:02 +00:00
freebsd-ports/net/asterisk16/files/asterisk.sh.in
Maxim Sobolev 22d259e0ed o Update to 1.4.8, which fixes some security issues.
PR:		114720, 114712

o Enable zaptel channel and friends on AMD64.

PR:		112624

o Improve startup script.

PR:		107222
2007-07-22 10:40:35 +00:00

34 lines
516 B
Bash

#!/bin/sh
# PROVIDE: asterisk
# REQUIRE: DAEMON
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable asterisk:
#
# asterisk_enable="YES"
#
. %%RC_SUBR%%
stop_precmd=asterisk_shutdown
sig_stop=KILL
asterisk_shutdown () {
%%PREFIX%%/sbin/asterisk -qrx 'stop now'
sleep 1
return 0
}
name=asterisk
rcvar=`set_rcvar`
command=%%PREFIX%%/sbin/asterisk
load_rc_config $name
pidfile=${asterisk_pidfile:-"/var/run/asterisk.pid"}
asterisk_enable=${asterisk_enable:-"NO"}
run_rc_command "$1"