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.82.25 lib/specinfra/command/module/service/openrc.rb
specinfra-2.82.24 lib/specinfra/command/module/service/openrc.rb
specinfra-2.82.23 lib/specinfra/command/module/service/openrc.rb
specinfra-2.82.22 lib/specinfra/command/module/service/openrc.rb
specinfra-2.82.21 lib/specinfra/command/module/service/openrc.rb
specinfra-2.82.20 lib/specinfra/command/module/service/openrc.rb
specinfra-2.82.19 lib/specinfra/command/module/service/openrc.rb
specinfra-2.82.18 lib/specinfra/command/module/service/openrc.rb
specinfra-2.82.17 lib/specinfra/command/module/service/openrc.rb
specinfra-2.82.16 lib/specinfra/command/module/service/openrc.rb
specinfra-2.82.15 lib/specinfra/command/module/service/openrc.rb
specinfra-2.82.14 lib/specinfra/command/module/service/openrc.rb
specinfra-2.82.13 lib/specinfra/command/module/service/openrc.rb
specinfra-2.82.12 lib/specinfra/command/module/service/openrc.rb