]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/initscripts/init.d/asterisk
add hosts gateway entry for red static
[people/pmueller/ipfire-2.x.git] / src / initscripts / init.d / asterisk
CommitLineData
9bfa4a36
MT
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
18case "${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 ;;
50esac
51
52# End $rc_base/init.d/asterisk