]> git.pld-linux.org Git - packages/asterisk.git/blobdiff - asterisk.init
- http://soft-switch.org/downloads/spandsp/spandsp-0.0.2pre25/asterisk-1.2.x/
[packages/asterisk.git] / asterisk.init
index e3c0a557d8ee8afeda1f814b612436eecb0411dc..d14d8a9677b6d836453ecbc4dfaff5b01be4de22 100644 (file)
@@ -5,12 +5,12 @@
 #
 # 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
 # config:      /etc/asterisk/asterisk.conf
 
@@ -26,7 +26,7 @@
 
 # Check that networking is up.
 if is_yes "${NETWORKING}"; then
-       if [ ! -f /var/lock/subsys/network ]; then
+       if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
                msg_network_down Asterisk
                exit 1
        fi
@@ -66,18 +66,19 @@ case "$1" in
        $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 $?
This page took 0.102692 seconds and 4 git commands to generate.