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