Commit graph

5 commits

Author SHA1 Message Date
Dave Collins 6c5da28550 Update winsvc import paths to new location. 2015-01-15 16:46:18 -06:00
Tomás Senart 84fa553b65 Split imports into logical groups 2014-07-02 15:56:41 +02:00
Dave Collins aeec39c1ff Add 2014 to copyright dates. 2014-01-01 10:16:15 -06:00
Dave Collins dfbb9446c4 Ensure Win service bits only compile on Windows. 2013-11-25 20:58:18 -06:00
Dave Collins 45732c99fb Allow btcd to run as a Windows service.
This commit modifies btcd to run cleanly as a Windows service.  btcd is
intended to be a long running process that stays synchronized with the
bitcoin block chain and provides chain services to multiple users.  It
follows that a service is the best option on Windows for this
functionality.

A few key points are:

- Supports graceful shutdown via the service stop/shutdown commands
- Integrates cleanly with the Windows event log
- Adds a new /s flag that can be used to install/remove/start/stop the
  service

One outstanding issue is that the application data directory is currently
user specific which means, by default, if you start btcd as a user, the
same data won't be used as when it's running as a service.  This needs to
be resovled.  The most likely approach will be to put all data into the
common appdata directory Windows provides, but it will require some
additional work to deal with permissions properly as user processes can't
write there by default.

Closes #42.
2013-11-25 18:36:11 -06:00