require 'hover/extend'

module Hover
  class Apache < Hover::Service
    def initialize(name)
      super
      @sudo = true
    end

    def start
      @start ||= 'sudo apachectl start 1>&2'
    end

    def stop
      @stop ||= 'sudo apachectl stop 1>&2'
    end

    def restart
      @restart ||= 'sudo apachectl restart 1>&2'
    end

    def status
      @status ||= 'ps aux | pgrep httpd'
    end
  end

  Hover::Extend.register 'Apache', Apache
end
