Merged revisions 80789 via svnmerge from
[asterisk/asterisk.git] / contrib / init.d / rc.redhat.asterisk
index 615ec27..27d633e 100755 (executable)
@@ -1,9 +1,9 @@
 #!/bin/sh
-# $Id: asterisk,v 1.3 2005/11/17 22:30:01 Gregory Boehnlein <damin@nacs.net>
+# $Id$
 #
 # 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`