Sha256: 9fa3d5ea7668f42a829c2675474b10e391e407fa15bb8530b1137f66feb71f8c
Contents?: true
Size: 889 Bytes
Versions: 21
Compression:
Stored size: 889 Bytes
Contents
class Service def initialize(teuton_host, param) @teuton_host = teuton_host @parent = teuton_host.parent @host = teuton_host.host @param = param end def is_running? @parent.target("Service #{@param} is running?") @parent.run "systemctl status #{@param}", on: @host @parent.expect_one ["Active:", "running"] end def is_inactive? @parent.target("Service #{@param} is inactive?") @parent.run "systemctl status #{@param}", on: @host @parent.expect_one ["Active:", "inactive"] end def is_enable? @parent.target("Service #{@param} is enable?") @parent.run "systemctl status #{@param}", on: @host @parent.expect_one ["Loaded:", "enable"] end def is_disable? @parent.target("Service #{@param} is disable?") @parent.run "systemctl status #{@param}", on: @host @parent.expect_one ["Loaded:", "disable"] end end
Version data entries
21 entries across 21 versions & 1 rubygems