Sha256: a67d80a3f1c27a4cc12e6a68a73f113429c9283ab6b2f859416433932127552e

Contents?: true

Size: 1009 Bytes

Versions: 236

Compression:

Stored size: 1009 Bytes

Contents

module Specinfra
  module Command
    module Module
      module Service
        module Init
          def check_is_enabled_under_init(service, level=3)
            "chkconfig --list #{escape(service)} | grep #{level}:on"
          end

          def check_is_running_under_init(service)
            "service #{escape(service)} status"
          end

          def enable_under_init(service)
            "chkconfig #{escape(service)} on"
          end

          def disable_under_init(service)
            "chkconfig #{escape(service)} off"
          end

          def start_under_init(service)
            "service #{escape(service)} start"
          end

          def stop_under_init(service)
            "service #{escape(service)} stop"
          end

          def restart_under_init(service)
            "service #{escape(service)} restart"
          end

          def reload_under_init(service)
            "service #{escape(service)} reload"
          end
        end
      end
    end
  end
end

Version data entries

236 entries across 236 versions & 3 rubygems

Version Path
specinfra-2.91.0 lib/specinfra/command/module/service/init.rb
specinfra-2.90.1 lib/specinfra/command/module/service/init.rb
specinfra-2.90.0 lib/specinfra/command/module/service/init.rb
specinfra-2.89.0 lib/specinfra/command/module/service/init.rb
specinfra-2.88.2 lib/specinfra/command/module/service/init.rb
specinfra-2.88.1 lib/specinfra/command/module/service/init.rb
specinfra-2.88.0 lib/specinfra/command/module/service/init.rb
specinfra-2.87.2 lib/specinfra/command/module/service/init.rb
specinfra-2.87.1 lib/specinfra/command/module/service/init.rb
specinfra-2.87.0 lib/specinfra/command/module/service/init.rb
specinfra-2.86.0 lib/specinfra/command/module/service/init.rb
specinfra-2.85.1 lib/specinfra/command/module/service/init.rb
specinfra-2.85.0 lib/specinfra/command/module/service/init.rb
specinfra-2.84.1 lib/specinfra/command/module/service/init.rb
specinfra-2.84.0 lib/specinfra/command/module/service/init.rb
specinfra-2.83.4 lib/specinfra/command/module/service/init.rb
specinfra-2.83.3 lib/specinfra/command/module/service/init.rb
specinfra-2.83.2 lib/specinfra/command/module/service/init.rb
specinfra-2.83.1 lib/specinfra/command/module/service/init.rb
specinfra-2.83.0 lib/specinfra/command/module/service/init.rb