Changes

Jump to navigation Jump to search
Line 47: Line 47:  
  status() {
 
  status() {
 
         printf "%-50s" "Checking $NAME..."
 
         printf "%-50s" "Checking $NAME..."
if [ -f $PIDFILE ]; then
+
    if [ -f $PIDFILE ]; then
PID=`cat $PIDFILE`
+
      PID=`cat $PIDFILE`
if [ -z "`ps axf | grep ${PID} | grep -v grep`" ]; then
+
      if [ -z "`ps axf | grep ${PID} | grep -v grep`" ]; then
printf "%s\n" "Process dead but pidfile exists"
+
        printf "%s\n" "Process dead but pidfile exists"
else
+
      else
echo "Running, the PID is $PID"
+
        echo "Running, the PID is $PID"
fi
+
      fi
else
+
    else
printf "%s\n" "Service not running"
+
      printf "%s\n" "Service not running"
fi
+
    fi
 
  }
 
  }
 
   
 
   

Navigation menu