############################################################################ # demo_daemon_ctl.rb # # This is a command line script for installing and/or running a small # Ruby program as a service. The service will simply write a small bit # of text to a file every 20 seconds. It will also write some text to the # file during the initialization (service_init) step. # # It should take about 10 seconds to start, which is intentional - it's a test # of the service_init hook, so don't be surprised if you see "one moment, # start pending" about 10 times on the command line. # # The file in question is C:\test.log. Feel free to delete it when finished. # # To run the service, you must install it first. # # Usage: ruby demo_daemon_ctl.rb