/usr/lib/ruby/vendor_ruby/specinfra/command/module/service/systemd.rb is in ruby-specinfra 2.66.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | 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
|