Sha256: acb788ac765ab47fcc2868936a39c7ab91a96b168ce5a2b7f5dab1cbe4807d18

Contents?: true

Size: 1.02 KB

Versions: 34

Compression:

Stored size: 1.02 KB

Contents

module Specinfra
  module Command
    module Module
      module Service
        module OpenRC
          def check_is_enabled_under_openrc(service, level=3)
            "rc-update show boot default | grep -w #{escape(service)}"
          end

          def check_is_running_under_openrc(service)
            "/etc/init.d/#{escape(service)} status"
          end

          def enable_under_openrc(service)
            "rc-update add #{escape(service)}"
          end

          def disable_under_openrc(service)
            "rc-update del #{escape(service)}"
          end

          def start_under_openrc(service)
            "rc-service #{escape(service)} start"
          end

          def stop_under_openrc(service)
            "rc-service #{escape(service)} stop"
          end

          def restart_under_openrc(service)
            "rc-service #{escape(service)} restart"
          end

          def reload_under_openrc(service)
            "/etc/init.d/#{escape(service)} reload"
          end
        end
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

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