Created
September 4, 2013 01:49
-
-
Save happymcplaksin/6431886 to your computer and use it in GitHub Desktop.
Register the YaketyStats service on Windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
equire "win32/service" | |
include Win32 | |
begin | |
Service.new( | |
:service_name => 'yaketystats', | |
:host => 'localhost', | |
:service_type => Service::WIN32_OWN_PROCESS, | |
:description => 'YaketyStats client for Windows', | |
:start_type => Service::AUTO_START, | |
:error_control => Service::ERROR_NORMAL, | |
:binary_path_name => 'c:\usr\local\ys\ruby\bin\ruby.exe C:\usr\local\ys\collector\bin\yaketystats-service > c:\var\yaketystats\service.log 2>&1', | |
:load_order_group => 'Network', | |
:dependencies => ['W32Time','Schedule'], | |
:service_start_name => 'LocalSystem', | |
:display_name => 'YaketyStats', | |
) | |
rescue => e | |
print "Badness trying to register service: #{e.inspect}.\n" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment