]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/initscripts/init.d/asterisk
223c016888f98e2691f699dcb6293bfc5b90e54f
[people/pmueller/ipfire-2.x.git] / src / initscripts / init.d / asterisk
1 #!/bin/sh
2 ########################################################################
3 # Begin $rc_base/init.d/asterisk
4 #
5 # Description : Asterisk Script
6 #
7 # Authors : Michael Tremer (mitch@ipfire.org)
8 #
9 # Version : 01.00
10 #
11 # Notes :
12 #
13 ########################################################################
14
15 . /etc/sysconfig/rc
16 . ${rc_functions}
17
18 case "${1}" in
19 start)
20 boot_mesg "Starting Asterisk PBX..."
21 loadproc /usr/sbin/asterisk
22 ;;
23
24 stop)
25 boot_mesg "Stopping Asterisk PBX..."
26 asterisk -rx "stop gracefully" >/dev/null 2>&1
27 evaluate_retval
28 ;;
29
30 reload)
31 boot_mesg "Reloading Asterisk PBX..."
32 asterisk -rx "reload" >/dev/null 2>&1
33 evaluate_retval
34 ;;
35
36 restart)
37 ${0} stop
38 sleep 1
39 ${0} start
40 ;;
41
42 status)
43 statusproc /usr/sbin/asterisk
44 ;;
45
46 *)
47 echo "Usage: ${0} {start|stop|reload|restart|status}"
48 exit 1
49 ;;
50 esac
51
52 # End $rc_base/init.d/asterisk