Skip to content

Commit

Permalink
Add rc script taken from the 1.8 update diff sent to ports@ by sthen@.
Browse files Browse the repository at this point in the history
sthen@ ok.
  • Loading branch information
Federico G. Schwindt committed Jan 4, 2011
1 parent 86bedca commit 8117267
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 9 deletions.
3 changes: 2 additions & 1 deletion telephony/asterisk/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.96 2010/11/20 19:56:47 espie Exp $
# $OpenBSD: Makefile,v 1.97 2011/01/04 22:35:46 fgsch Exp $

SHARED_ONLY= Yes
COMMENT-main= open source multi-protocol PBX and telephony toolkit
Expand All @@ -7,6 +7,7 @@ VER= 1.6.2.14
CORESOUNDS= 1.4.19
DISTNAME= asterisk-${VER:S/rc/-rc/}
PKGNAME-main= asterisk-${VER}
REVISION-main = 0

CATEGORIES= telephony

Expand Down
7 changes: 0 additions & 7 deletions telephony/asterisk/pkg/MESSAGE-main
Original file line number Diff line number Diff line change
@@ -1,9 +1,2 @@
Simplified sample configuration is provided in ${SYSCONFDIR}/asterisk;
the full set is available in ${PREFIX}/share/examples/asterisk/default.

To have Asterisk start at boot time, you may insert the following
into /etc/rc.local:

if [ -x ${PREFIX}/sbin/safe_asterisk ]; then
echo -n ' asterisk'; ${PREFIX}/sbin/safe_asterisk
fi
4 changes: 3 additions & 1 deletion telephony/asterisk/pkg/PLIST-main
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST-main,v 1.33 2010/11/16 21:58:52 sthen Exp $
@comment $OpenBSD: PLIST-main,v 1.34 2011/01/04 22:35:47 fgsch Exp $
@conflict asterisk-sounds-<=1.2.1p2
@conflict asterisk-ogg-*
@conflict chan_unistim-*
Expand Down Expand Up @@ -1691,3 +1691,5 @@ share/examples/asterisk/voicemail/default/1234/en/busy.gsm
share/examples/asterisk/voicemail/default/1234/en/unavail.gsm
@owner _asterisk
@sample /var/spool/asterisk/voicemail/default/1234/en/unavail.gsm
@owner
@rcscript ${RCDIR}/asterisk
17 changes: 17 additions & 0 deletions telephony/asterisk/pkg/asterisk.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh
#
# $OpenBSD: asterisk.rc,v 1.1 2011/01/04 22:35:47 fgsch Exp $

daemon="${TRUEPREFIX}/sbin/asterisk"

. /etc/rc.d/rc.subr

rc_start() {
${TRUEPREFIX}/sbin/safe_asterisk > /dev/null
}

rc_stop() {
${daemon} -rx "core stop now"
}

rc_cmd $1

0 comments on commit 8117267

Please sign in to comment.