Sha256: 879b288b2cbac8513f51af144400524b655a66def75fc955e8a97e73765afb0c
Contents?: true
Size: 439 Bytes
Versions: 103
Compression:
Stored size: 439 Bytes
Contents
class Specinfra::Command::Base::Cron < Specinfra::Command::Base class << self def check_has_entry(user, entry) entry_escaped = entry.gsub(/\*/, '\\*').gsub(/\[/, '\\[').gsub(/\]/, '\\]') grep_command = "grep -v '^[[:space:]]*#' | grep -- ^#{escape(entry_escaped)}$" if user.nil? "crontab -l | #{grep_command}" else "crontab -u #{escape(user)} -l | #{grep_command}" end end end end
Version data entries
103 entries across 103 versions & 1 rubygems