mirror of
https://github.com/jimeh/skyhook.git
synced 2026-02-19 11:06:38 +00:00
19 lines
283 B
Ruby
19 lines
283 B
Ruby
|
|
# utility methods
|
|
def shell(*args)
|
|
if $debug.nil? || $debug > 1
|
|
send(:system, *args)
|
|
else
|
|
puts "DEBUG: " + args.join(" ")
|
|
end
|
|
end
|
|
|
|
def write_status(status)
|
|
case status
|
|
when 1
|
|
shell "echo '1' > #{$status_file}"
|
|
when 0
|
|
shell "rm #{$status_file}"
|
|
end
|
|
end
|