Bitcoin Forum
December 08, 2016, 08:08:44 AM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Bitcoin Service Wrapper - Run Bitcoind as NT Service  (Read 2172 times)
mb300sd
Legendary
*
Offline Offline

Activity: 1232

Drunk Posts


View Profile WWW
September 11, 2011, 06:23:30 PM
 #1

I wrote a simple wrapper program that runs bitcoind as a NT service so that you don't have to be logged on for it to be running. Useful for any web server that needs to access it, and allows it to be auto started.

Put BitcoinServiceWrapper.exe somewhere that your Local Service account has access to it. Put your bitcoin.conf in C:\Windows\ServiceProfiles\LocalService\AppData\Roaming\Bitcoin. Run BitcoinServiceWrapper.exe install and then sc start bitcoind to install the service and start it.

http://www.mediafire.com/?cyy1lqp6xo9042h

Donations welcome if you find it useful, 5BTC required if you use it commercially.

1D7FJWRzeKa4SLmTznd3JpeNU13L1ErEco
1481184524
Hero Member
*
Offline Offline

Posts: 1481184524

View Profile Personal Message (Offline)

Ignore
1481184524
Reply with quote  #2

1481184524
Report to moderator
1481184524
Hero Member
*
Offline Offline

Posts: 1481184524

View Profile Personal Message (Offline)

Ignore
1481184524
Reply with quote  #2

1481184524
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
nhodges
Sr. Member
****
Offline Offline

Activity: 308


View Profile
September 11, 2011, 10:06:12 PM
 #2

Why not just use instsrv.exe / srvany.exe?

mb300sd
Legendary
*
Offline Offline

Activity: 1232

Drunk Posts


View Profile WWW
September 11, 2011, 10:20:20 PM
 #3

I have code in OnStop() that shuts down bitcoind, and just find this to be a cleaner approach. Using this for myself and may add other bitcoin specific features if needed.

1D7FJWRzeKa4SLmTznd3JpeNU13L1ErEco
nhodges
Sr. Member
****
Offline Offline

Activity: 308


View Profile
September 11, 2011, 11:09:37 PM
 #4

I thought that's the sort of functionality the combination of those two executables provide: the ability to start/stop any .exe via Windows Service controls.

mb300sd
Legendary
*
Offline Offline

Activity: 1232

Drunk Posts


View Profile WWW
September 12, 2011, 12:06:50 AM
 #5

I meant shut down as in calling bitcoind stop, rather than just killing the process. Not sure if it does anything different though.

1D7FJWRzeKa4SLmTznd3JpeNU13L1ErEco
rjk
Sr. Member
****
Offline Offline

Activity: 420


1ngldh


View Profile
February 16, 2012, 11:19:22 PM
 #6

Here are some mods I made so that this could work with other coins. At the moment, it is set up for Bitcoin, Namecoin, and Litecoin. Using the included file structure, it is pretty simple to modify for other altchains, just copy one folder and then find/replace all references from Bitcoin to whatever else you want to run.

Why use this instead of instsrv/srvany? As mentioned in the previous post, srvany terminates bitcoind uncleanly, which isn't very nice. Unfortunately, bitcoind (and any variants based on it) don't seem to understand standard shutdown signals - and instead force you to send it the command "stop". That's what these service wrappers do: when you click Stop (or do "net stop bitcoind"), it sends bitcoind the command "stop", and then waits for it to exit before quitting.

Unfortunately I don't have the necessary code chops to make this work with P2Pool - it requires modifications so that you can pass arguments - however, P2Pool is OK to kill and not try any graceful termination (according to forrestv, its author). So Instsrv/Srvany work just fine with it.

The binaries have been pre-compiled for you, but I always encourage everyone to compile it themselves to be sure. It really is only 2 or 3 clicks to compile once VS 2010 is installed - instructions are in the README.txt in the archive.

http://www.mediafire.com/file/qenfz6ctvez2lkv/ServiceWrappers.7z

Code:
  File: ServiceWrappers.7z
CRC-32: 62a30307
   MD4: 11d89c5fd6895a7e1f0d706deb62ec97
   MD5: 90022cf69c804a34de99b63cd3bb80fd
 SHA-1: f0e04800699e4ccf94e4c491796ad5941d3fc292

Enjoy!

Mining Rig Extraordinaire - the Trenton BPX6806 18-slot PCIe backplane [PICS] Dead project is dead, all hail the coming of the mighty ASIC!
MasterX
Member
**
Offline Offline

Activity: 88



View Profile
November 14, 2012, 08:59:08 AM
 #7

Is there a mirror for this file?
The link above seems broken.

| Donations: 1MegaXG1bd6mTEQCdAMjVzGexcYrF5LJKv |
Kiaya
Jr. Member
*
Offline Offline

Activity: 33



View Profile
August 02, 2013, 10:56:24 AM
 #8

Anyone playing around with this, don't forget to give LocalService appropriate permissions over the Bitcoin directory.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!