#
# chkconfig: 345 90 25
#
-# description: Asterisk is an Open Source PBX and telephony development platform that
-# can both replace a conventional PBX and act as a platform for
-# developing custom telephony applications for delivering dynamic
-# content over a telephone similarly to how one can deliver dynamic
+# description: Asterisk is an Open Source PBX and telephony development platform that \ \
+# can both replace a conventional PBX and act as a platform for \
+# developing custom telephony applications for delivering dynamic \
+# content over a telephone similarly to how one can deliver dynamic \
# content through a web browser using CGI and a web server.
#
# pidfile: /var/run/asterisk.pid
$0 start
exit $?
;;
-# reload)
- # Should be some better way...
-# $0 restart
-# if [ -f /var/lock/subsys/ ]; then
-# msg_reloading Asterisk
-# busy
-# ok
-# else
-# msg_not_running Asterisk
-# exit 1
-# fi
-# ;;
+ reload)
+ if [ -f /var/lock/subsys/asterisk ]; then
+ msg_reloading Asterisk
+ busy
+ asterisk -rx reload > /dev/null 2>&1
+ RETVAL=$?
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/asterisk
+ ok
+ else
+ msg_not_running Asterisk
+ exit 1
+ fi
+ ;;
status)
status asterisk
exit $?