ed002f3d44
This fixes a bug in which music on hold isn't loaded on startup
28 lines
410 B
Bash
28 lines
410 B
Bash
#!/bin/sh
|
|
#
|
|
# /etc/rc.d/asterisk: start/stop/restart asterisk
|
|
#
|
|
|
|
USER=asterisk
|
|
GROUP=asterisk
|
|
|
|
case $1 in
|
|
start)
|
|
(cd /; /usr/sbin/asterisk -G $GROUP -U $USER)
|
|
;;
|
|
startdebug)
|
|
/usr/sbin/asterisk -G $GROUP -U $USER -vvv
|
|
;;
|
|
stop)
|
|
[ -f /var/run/asterisk/asterisk.pid ] && kill `cat /var/run/asterisk/asterisk.pid`
|
|
;;
|
|
restart)
|
|
$0 stop
|
|
sleep 2
|
|
$0 start
|
|
;;
|
|
*)
|
|
echo "usage: $0 [start|stop|restart]"
|
|
;;
|
|
esac
|