anchor.diff:        0)
           log_end_msg 0
           do_start
  -        case "$?" in
  -            0) log_end_msg 0 ;;
  -            *) log_end_msg 1 ;; # Failed to start
  -        esac
           ;;
         *)
  -        # Failed to stop
           log_end_msg 1
           ;;
       esac
  
positive.code: 
      if [ "$RUN" != "true" ]; then
          log_action_msg "Not starting glances: disabled by /etc/default/$NAME".
          exit 0
      fi
  
      start-stop-daemon --start --chuid $USER --pidfile=$PIDFILE --quiet -m -b --exec $DAEMON -- $DAEMON_ARGS || return 2
      [ -e "$PIDFILE" ] && chown $USER $PIDFILE
      return 0
  }
  
  #
  # Function that stops the daemon/service
  #
  do_stop()
  {
      log_daemon_msg "Stopping $DESC" "$NAME "
      if [ ! -w $PIDFILE ]
      then
          log_warning_msg "PID file not found"
          return 4
      fi
      start-stop-daemon --stop --oknodo --chuid $USER --pidfile=$PID --user=$USER --pidfile="$PIDFILE" --retry=30 || return 1
      /bin/rm -f $PIDFILE
      return 0
  }
  
  case "$1" in
    start)
      do_start
      case "$?" in
          0|1) log_end_msg 0 ;;
          2) log_end_msg 1 ;;
      esac
      ;;
    stop)
      do_stop
      case "$?" in
          0) log_end_msg 0 ;;
          1) log_end_msg 1 ;;
      esac
      ;;
    status)
      status_of_proc -p "$PIDFILE" "$DAEMON" "$NAME"
  
negative.code:     chmod 755 "$(dirname $PIDFILE)"
  fi
  
  do_start()
  {
      log_daemon_msg "Starting $DESC" "$NAME "
      [ -e $PIDFILE ] && PID=$(cat "$PIDFILE")
      if ( [ -e $PIDFILE ] && ps -p $PID 1>&2 > /dev/null )
      then
          log_action_end_msg 1 "already running, PID's $PID"
          exit 1
      elif ( [ -w $PIDFILE ] )
      then
          log_warning_msg "PID file found while ${NAME} is not running, removing file."
  