diff options
author | Florian Smeets <flo@FreeBSD.org> | 2011-01-04 14:17:02 +0000 |
---|---|---|
committer | Florian Smeets <flo@FreeBSD.org> | 2011-01-04 14:17:02 +0000 |
commit | ed643170300537eeb69a344b0e362ccdca1f4cd7 (patch) | |
tree | c779a8bcbbf323ba09d41ffe470e54617ff7dcff /net/asterisk10/files | |
parent | 9525278d24986ba08d8ecbd1755c643043d79c64 (diff) | |
download | ports-ed643170300537eeb69a344b0e362ccdca1f4cd7.tar.gz ports-ed643170300537eeb69a344b0e362ccdca1f4cd7.zip |
Notes
Diffstat (limited to 'net/asterisk10/files')
-rw-r--r-- | net/asterisk10/files/asterisk.sh.in | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/net/asterisk10/files/asterisk.sh.in b/net/asterisk10/files/asterisk.sh.in index 4d10717d64ae..d8bdac9e3ba6 100644 --- a/net/asterisk10/files/asterisk.sh.in +++ b/net/asterisk10/files/asterisk.sh.in @@ -1,4 +1,7 @@ #!/bin/sh +# +# $FreeBSD$ +# # PROVIDE: asterisk # REQUIRE: LOGIN @@ -11,23 +14,29 @@ . /etc/rc.subr -stop_cmd=asterisk_shutdown -asterisk_shutdown () { - echo 'Stopping asterisk' - %%PREFIX%%/sbin/asterisk -nqrx 'core stop now' - sleep 1 - return 0 -} - name=asterisk rcvar=`set_rcvar` -command=%%PREFIX%%/sbin/asterisk +extra_commands="reload" + +stop_cmd="asterisk_stop" +reload_cmd="asterisk_reload" + +command="%%PREFIX%%/sbin/asterisk" command_args="-n -U %%ASTERISK_USER%%" +pidfile=${asterisk_pidfile:-"/var/run/asterisk/asterisk.pid"} -load_rc_config $name +asterisk_stop() { + echo 'Stopping asterisk' + $command -nqrx 'core stop now' +} -pidfile=${asterisk_pidfile:-"/var/run/asterisk.pid"} +asterisk_reload() { + echo 'Reloading asterisk' + $command -nqrx 'reload' +} + +load_rc_config $name asterisk_enable=${asterisk_enable:-"NO"} |