Displaying 1 result from an estimated 1 matches for "service_displayname".
2004 Feb 10
0
Daemon help
...NNING
File.open("c:\\foo.log","a+"){ |f| f.puts "foo
running" }
sleep 5
end
end
end
d = Daemon.new
d.mainloop
# END daemon.rb
# daemonctrl.rb in ''C:\somedir''
require "win32/service"
include Win32
SERVICE_NAME = "FooSvc"
SERVICE_DISPLAYNAME = "Foo Service"
PROGRAM = "c:\\daemon.rb"
if ARGV[0]=="install"
svc = Service.new
svc.create_service{ |s|
s.service_name = SERVICE_NAME
s.display_name = SERVICE_DISPLAYNAME
s.binary_path_name = ''ruby '' + PROGRAM
s....