summaryrefslogtreecommitdiff
path: root/comms/asterisk/files/asterisk.sh
blob: 71130999f358ae41c5230b2a5c3eb3e4a180b2f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: asterisk.sh,v 1.2 2006/11/01 18:59:16 mjl Exp $
#
# PROVIDE: asterisk
# REQUIRE: DAEMON
# KEYWORD: shutdown
#
# You will need to set some variables in /etc/rc.conf to start Asterisk:
#
# asterisk=YES

if [ -f /etc/rc.subr ]
then
	. /etc/rc.subr
fi

name="asterisk"
rcvar=$name
command="@PREFIX@/sbin/asterisk"
required_files="@PKG_SYSCONFDIR@/asterisk.conf"

#start_cmd="asterisk_doit start"
#restart_cmd="asterisk_doit restart"
stop_cmd="sudo asterisk -r -x 'stop gracefully' >/dev/null"
asterisk_nice="-20"

load_rc_config $name
run_rc_command "$1"