summaryrefslogtreecommitdiff
path: root/net/asterisk11/files
diff options
context:
space:
mode:
authorGuido Falsi <madpilot@FreeBSD.org>2016-01-31 17:11:47 +0000
committerGuido Falsi <madpilot@FreeBSD.org>2016-01-31 17:11:47 +0000
commit5778ec1febb4956392f848a4311f18a8ffb59080 (patch)
treedada85e1ff902c8b0eadd70c4aece36ac5e8025c /net/asterisk11/files
parentUpgrade lang/elixir to version 1.2.2. (diff)
- Enable SPANDSP option by default
- Make startup script create pidfile directory if it does not exist While here, reflow OPTIONS_DEFAULT lists. Subitted/Requested by: lidl@
Diffstat (limited to 'net/asterisk11/files')
-rw-r--r--net/asterisk11/files/asterisk.in9
1 files changed, 9 insertions, 0 deletions
diff --git a/net/asterisk11/files/asterisk.in b/net/asterisk11/files/asterisk.in
index b8e24b5ee78b..e2d997ecc201 100644
--- a/net/asterisk11/files/asterisk.in
+++ b/net/asterisk11/files/asterisk.in
@@ -34,6 +34,7 @@ load_rc_config $name
extra_commands=reload
+start_precmd=asterisk_precmd
stop_cmd=asterisk_stop
reload_cmd=asterisk_reload
@@ -41,6 +42,14 @@ command="%%PREFIX%%/sbin/asterisk"
command_args="${asterisk_args} -F -U ${asterisk_user}"
pidfile=${asterisk_pidfile}
+asterisk_precmd()
+{
+ local rundir=${asterisk_pidfile%/*}
+ if [ ! -d $rundir ] ; then
+ install -d -m 0755 -o asterisk -g asterisk $rundir
+ fi
+}
+
asterisk_stop()
{
echo 'Stopping asterisk'