[BACK]Return to asterisk.sh CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / comms / asterisk16 / files

File: [cvs.NetBSD.org] / pkgsrc / comms / asterisk16 / files / asterisk.sh (download)

Revision 1.7, Tue Aug 20 13:47:42 2019 UTC (2 years, 10 months ago) by ryoon
Branch: MAIN
CVS Tags: pkgsrc-2022Q2-base, pkgsrc-2022Q2, pkgsrc-2022Q1-base, pkgsrc-2022Q1, pkgsrc-2021Q4-base, pkgsrc-2021Q4, pkgsrc-2021Q3-base, pkgsrc-2021Q3, pkgsrc-2021Q2-base, pkgsrc-2021Q2, pkgsrc-2021Q1-base, pkgsrc-2021Q1, pkgsrc-2020Q4-base, pkgsrc-2020Q4, pkgsrc-2020Q3-base, pkgsrc-2020Q3, pkgsrc-2020Q2-base, pkgsrc-2020Q2, pkgsrc-2020Q1-base, pkgsrc-2020Q1, pkgsrc-2019Q4-base, pkgsrc-2019Q4, pkgsrc-2019Q3-base, pkgsrc-2019Q3, HEAD
Changes since 1.6: +1 -1 lines

comms/asterisk16: import asterisk-16.5.0

Asterisk is a complete PBX in software.  It provides all of the
features you would expect from a PBX and more. Asterisk does voice
over IP in three protocols, and can interoperate with almost all
standards-based telephony equipment using relatively inexpensive
hardware.

Asterisk provides Voicemail services with Directory, Call Conferencing,
Interactive Voice Response, Call Queuing. It has support for
three-way calling, caller ID services, ADSI, SIP and H.323 (as both
client and gateway).

#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: asterisk.sh,v 1.7 2019/08/20 13:47:42 ryoon Exp $
#
# PROVIDE: asterisk
# REQUIRE: DAEMON
# KEYWORD: shutdown
#
# You will need to set some variables in /etc/rc.conf to start Asterisk:
#
# asterisk=YES

if [ -f /etc/rc.subr ]
then
	. /etc/rc.subr
fi

name="asterisk"
rcvar=$name
command="@PREFIX@/sbin/asterisk"
pidfile=@ASTVARRUNDIR@/${name}.pid
required_files="@PKG_SYSCONFDIR@/asterisk.conf"
extra_commands="reload"
start_precmd=asterisk_prestart

auser="@ASTERISK_USER@"
agroup="@ASTERISK_GROUP@"
command_args="-U $auser -G $agroup -n"

asterisk_prestart() {
	if test ! -d @ASTVARRUNDIR@; then
		mkdir @ASTVARRUNDIR@
	fi
	chown $auser:$agroup @ASTVARRUNDIR@
	chmod 0755 @ASTVARRUNDIR@
}

stop_cmd="$command -nr -x 'core stop gracefully' >/dev/null"
reload_cmd="$command -nr -x 'core reload' >/dev/null"
asterisk_nice="-20"

load_rc_config $name
run_rc_command "$1"