Sha256: dc852cf3d9248c7381785b6c4a15a7e9b155415339d0f1d0b222e8c95481c956
Contents?: true
Size: 506 Bytes
Versions: 71
Compression:
Stored size: 506 Bytes
Contents
class Specinfra::Command::Base::Cron < Specinfra::Command::Base class << self def check_has_entry(user, entry) entry_escaped = entry.gsub(/\\/, '\\\\\\').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 def get_table 'crontab -l' end end end
Version data entries
71 entries across 71 versions & 1 rubygems