module LoomExt::CoreMods::SystemdCommon
Public Instance Methods
do_systemctl(action, unit=nil, *args, flags: [])
click to toggle source
# File lib/loomext/coremods/systemd/systemd.rb, line 4 def do_systemctl(action, unit=nil, *args, flags: []) flags << "--no-pager" flags << "--no-legend" flags << "--no-ask-password" exec_args = [ "systemctl", flags, action, unit ].flatten.compact args = exec_args.concat args shell.execute(*args) end