Sha256: 87ec15355e872823f4df50fb96f9e57c4216cdb622fa482e246950154e147aa2

Contents?: true

Size: 1.03 KB

Versions: 215

Compression:

Stored size: 1.03 KB

Contents

module Specinfra
  module Command
    module Module
      module Service
        module Systemd
          def check_is_enabled_under_systemd(service, level=nil)
            "systemctl --quiet is-enabled #{escape(service)}"
          end

          def check_is_running_under_systemd(service)
            "systemctl is-active #{escape(service)}"
          end

          def enable_under_systemd(service)
            "systemctl enable #{escape(service)}"
          end

          def disable_under_systemd(service)
            "systemctl disable #{escape(service)}"
          end

          def start_under_systemd(service)
            "systemctl start #{escape(service)}"
          end

          def stop_under_systemd(service)
            "systemctl stop #{escape(service)}"
          end

          def restart_under_systemd(service)
            "systemctl restart #{escape(service)}"
          end

          def reload_under_systemd(service)
            "systemctl reload #{escape(service)}"
          end
        end
      end
    end
  end
end

Version data entries

215 entries across 215 versions & 3 rubygems

Version Path
specinfra-2.76.5 lib/specinfra/command/module/service/systemd.rb
specinfra-2.76.4 lib/specinfra/command/module/service/systemd.rb
specinfra-2.76.3 lib/specinfra/command/module/service/systemd.rb
specinfra-2.76.2 lib/specinfra/command/module/service/systemd.rb
specinfra-2.76.1 lib/specinfra/command/module/service/systemd.rb
specinfra-2.76.0 lib/specinfra/command/module/service/systemd.rb
specinfra-2.75.1 lib/specinfra/command/module/service/systemd.rb
specinfra-rb19-2.44.7 lib/specinfra/command/module/service/systemd.rb
specinfra-2.75.0 lib/specinfra/command/module/service/systemd.rb
specinfra-2.74.0 lib/specinfra/command/module/service/systemd.rb
specinfra-2.73.4 lib/specinfra/command/module/service/systemd.rb
specinfra-2.73.3 lib/specinfra/command/module/service/systemd.rb
specinfra-2.73.2 lib/specinfra/command/module/service/systemd.rb
specinfra-2.73.1 lib/specinfra/command/module/service/systemd.rb
specinfra-2.73.0 lib/specinfra/command/module/service/systemd.rb
specinfra-2.72.1 lib/specinfra/command/module/service/systemd.rb
specinfra-2.72.0 lib/specinfra/command/module/service/systemd.rb
specinfra-2.71.3 lib/specinfra/command/module/service/systemd.rb
specinfra-2.71.2 lib/specinfra/command/module/service/systemd.rb
specinfra-2.71.1 lib/specinfra/command/module/service/systemd.rb