25 lines
301 B
Plaintext
25 lines
301 B
Plaintext
|
#!/bin/sh
|
||
|
#
|
||
|
# /etc/rc.d/asterisk: start/stop/restart asterisk
|
||
|
#
|
||
|
|
||
|
USER=asterisk
|
||
|
GROUP=asterisk
|
||
|
|
||
|
case $1 in
|
||
|
start)
|
||
|
/usr/sbin/asterisk -G $GROUP -U $USER
|
||
|
;;
|
||
|
stop)
|
||
|
kill `cat /var/run/asterisk/asterisk.pid`
|
||
|
;;
|
||
|
restart)
|
||
|
$0 stop
|
||
|
sleep 2
|
||
|
$0 start
|
||
|
;;
|
||
|
*)
|
||
|
echo "usage: $0 [start|stop|restart]"
|
||
|
;;
|
||
|
esac
|