dont use deprecated commands in the init scripts.
authorMichiel van Baak <michiel@vanbaak.info>
Sat, 18 Oct 2008 09:02:36 +0000 (09:02 +0000)
committerMichiel van Baak <michiel@vanbaak.info>
Sat, 18 Oct 2008 09:02:36 +0000 (09:02 +0000)
(closes issue #13720)
Reported by: decryptus_proformatique
Patches:
      contrib_initd_module_reload.patch uploaded by decryptus (license 555)
  With mods by me to fix stop commands as well

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@150930 65c4cc65-6c06-0410-ace0-fbb531ad65f3

contrib/init.d/rc.debian.asterisk
contrib/init.d/rc.mandriva.asterisk
contrib/init.d/rc.redhat.asterisk
contrib/init.d/rc.suse.asterisk

index 015f2db..76406db 100755 (executable)
@@ -79,7 +79,7 @@ case "$1" in
        ;;
   reload)
        echo "Reloading $DESC configuration files."
-       $DAEMON -rx 'reload' > /dev/null 2> /dev/null
+       $DAEMON -rx 'module reload' > /dev/null 2> /dev/null
        ;;
   restart|force-reload)
        $0 stop
index daea071..1e036f0 100755 (executable)
@@ -142,7 +142,7 @@ case "$1" in
                ;;
        stop)
                gprintf "Stopping asterisk: "
-               asterisk -r -x "stop gracefully" >/dev/null 2>&1
+               asterisk -r -x "core stop gracefully" >/dev/null 2>&1
                killall -9 mpg123 2>/dev/null
                success
                echo
@@ -154,13 +154,13 @@ case "$1" in
                ;;
        reload)
                gprintf "Reloading asterisk: "
-               asterisk -r -x "reload" >/dev/null 2>&1
+               asterisk -r -x "module reload" >/dev/null 2>&1
                success
                echo
                ;;
        stopnow)
                gprintf "Stopping asterisk: "
-               asterisk -r -x "stop now" >/dev/null 2>&1
+               asterisk -r -x "core stop now" >/dev/null 2>&1
                success
                echo
                ;;
index d2a630e..f45f8d7 100755 (executable)
@@ -113,7 +113,7 @@ restart() {
 }
 
 reload() {
-       $DAEMON -rx 'reload' > /dev/null 2> /dev/null
+       $DAEMON -rx 'module reload' > /dev/null 2> /dev/null
 }
 
 # See how we were called.
index 76025f3..54b6720 100755 (executable)
@@ -105,7 +105,7 @@ restart() {
 }
 
 reload() {
-       $DAEMON -rx 'reload' > /dev/null 2> /dev/null
+       $DAEMON -rx 'module reload' > /dev/null 2> /dev/null
 }
 
 # See how we were called.