diff options
| author | Guido Falsi <madpilot@FreeBSD.org> | 2016-01-31 17:11:47 +0000 |
|---|---|---|
| committer | Guido Falsi <madpilot@FreeBSD.org> | 2016-01-31 17:11:47 +0000 |
| commit | 5778ec1febb4956392f848a4311f18a8ffb59080 (patch) | |
| tree | dada85e1ff902c8b0eadd70c4aece36ac5e8025c /net/asterisk11/files | |
| parent | Upgrade 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.in | 9 |
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' |
