Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- STATUS = 4
- puts STATUS
- lines = File.readlines(__FILE__)
- lines[0] = "STATUS = #{(STATUS+1)%5}\n"
- File.write(__FILE__, lines.join)
- if (ARGV[0] == "OFF" and STATUS == 0) or (ARGV[0] == "ON" and STATUS == 4) or ARGV[0] == nil
- exit
- else
- system("ruby #{__FILE__} #{ARGV[0]}")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement