Merged revisions 46563 via svnmerge from
[asterisk/asterisk.git] / contrib / init.d / rc.redhat.asterisk
index 615ec27..ecc968d 100755 (executable)
@@ -3,7 +3,7 @@
 #
 # asterisk    Starts, Stops and Reloads Asterisk.
 #
-# chkconfig: 2345 40 60
+# chkconfig: 2345 90 60
 # description: Asterisk PBX and telephony daemon.
 # processname: asterisk
 # pidfile: /var/run/asterisk.pid
@@ -38,12 +38,12 @@ AST_SBIN=/usr/sbin
 . /etc/rc.d/init.d/functions
 
 if ! [ -x $AST_SBIN/asterisk ] ; then
-       echo "ERROR: /usr/sbin/asterisk not found"
+       echo "ERROR: $AST_SBIN/asterisk not found"
        exit 0
 fi
 
 if ! [ -d $AST_CONFIG ] ; then
-       echo "ERROR: /etc/asterisk directory not found"
+       echo "ERROR: $AST_CONFIG directory not found"
        exit 0
 fi
 
@@ -58,7 +58,7 @@ SAFE_ASTERISK=$AST_SBIN/safe_asterisk
 
 # Allow configuration overrides in /etc/sysconfig/asterisk
 CONFIG0=`readlink $0`
-if [ $CONFIG0 = "" ]; then
+if [ "$CONFIG0" = "" ]; then
        CONFIGFILE=/etc/sysconfig/`basename $0`
 else
        CONFIGFILE=/etc/sysconfig/`basename $CONFIG0`