summaryrefslogtreecommitdiff
path: root/net/asterisk11
diff options
context:
space:
mode:
Diffstat (limited to 'net/asterisk11')
-rw-r--r--net/asterisk11/Makefile6
-rw-r--r--net/asterisk11/files/asterisk.in9
2 files changed, 13 insertions, 2 deletions
diff --git a/net/asterisk11/Makefile b/net/asterisk11/Makefile
index 78f4b760d9cb..3d8ba9177b55 100644
--- a/net/asterisk11/Makefile
+++ b/net/asterisk11/Makefile
@@ -2,6 +2,7 @@
PORTNAME= asterisk
PORTVERSION= 11.21.0
+PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= http://downloads.asterisk.org/pub/telephony/%SUBDIR%/:main,g729
MASTER_SITE_SUBDIR= asterisk/:main \
@@ -52,8 +53,9 @@ CONFLICTS_INSTALL= asterisk*-1.8* asterisk*-13*
OPTIONS_DEFINE= BACKTRACE CURL EXCHANGE FREETDS LDAP LUA \
MP3PLAYER OOH323 RADIUS SNMP SPANDSP SRTP \
SYSINFO UUID XMPP
-OPTIONS_DEFAULT= BACKTRACE CURL FREETDS GCC GSM LUA MP3PLAYER NEWT ODBC PGSQL \
- RADIUS SNMP SPEEX SQLITE2 UUID VORBIS XMPP
+OPTIONS_DEFAULT= BACKTRACE CURL FREETDS GCC GSM LUA MP3PLAYER \
+ NEWT ODBC PGSQL RADIUS SNMP SPANDSP SPEEX \
+ SQLITE2 UUID VORBIS XMPP
OPTIONS_DEFINE_i386= DAHDI
OPTIONS_DEFINE_amd64= DAHDI
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'