Sha256: 166c334281afe87c486588e3644c3edd4f28297725e237901caaaf8904e1e661
Contents?: true
Size: 696 Bytes
Versions: 9
Compression:
Stored size: 696 Bytes
Contents
module Serverspec module Commands class Debian < Linux def check_enabled(service, level=3) # Until everything uses Upstart, this needs an OR. "ls /etc/rc#{level}.d/ | grep -- #{escape(service)} || grep 'start on' /etc/init/#{escape(service)}.conf" end def check_installed(package, version=nil) escaped_package = escape(package) "dpkg -s #{escaped_package} && ! dpkg -s #{escaped_package} | grep -E '^Status: .+ not-installed$'" end def check_running(service) # This is compatible with Debian >Jaunty and Ubuntu derivatives "service #{escape(service)} status | grep 'running'" end end end end
Version data entries
9 entries across 9 versions & 1 rubygems