anchor.diff:  [ -x "$DAEMON" ] || exit 0
   
   # Source function library.
  -<% case node['platform_family'] -%>
  -<% when 'rhel', 'fedora' -%>
  -. /etc/rc.d/init.d/functions
  -<% else -%>
   . /lib/lsb/init-functions
  -<% end -%>
   
   # Ensure /run/glances is there, cf. Debian policy 9.4.1
   # http://www.debian.org/doc/debian-policy/ch-opersys.html#s-fhs-run
  
positive.code:     chmod 755 "$(dirname $PIDFILE)"
  fi
  
  #
  # Function that starts the daemon/service
  #
  do_start()
  {
      log_daemon_msg "Starting $DESC" "$NAME "
      # Return
      #   0 if daemon has been started
      #   1 if daemon was already running
      #   2 if daemon could not be started
      [ -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 0
      elif ( [ -w $PIDFILE ] )
      then
          log_warning_msg "PID file found while ${NAME} is not running, removing file."
  
negative.code:       0)
          log_end_msg 0
          do_start
          ;;
        *)
          log_end_msg 1
          ;;
      esac
  