Sha256: a69a5114a6dea861cba5a4b5d26c01da2868575f90b3c32c3c510f58d06e5121
Contents?: true
Size: 664 Bytes
Versions: 6
Compression:
Stored size: 664 Bytes
Contents
module Serverspec module Commands class Debian < Linux def check_enabled service # Until everything uses Upstart, this needs an OR. "ls /etc/rc3.d/ | grep -- #{escape(service)} || grep 'start on' /etc/init/#{escape(service)}.conf" end def check_installed package 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
6 entries across 6 versions & 1 rubygems