This is my customized version of the Eloipool mining pool server (written in Python) for FreeBSD 9.x.
It has some minor modifications to allow the server to run in FreeBSD, plus the rc.d script. Hopefully I'll make a port one day. This is still a work in progress.
Here is the rc.d startup script:
NOTE: that the config file in /usr/local/etc/eloipool.conf is not the real config file at the moment.
# PROVIDE: eloipool
# REQUIRE: LOGIN bitcoin
# KEYWORD: shutdown
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
# eloipool_enable (bool): Set to NO by default.
# Set it to YES to enable eloipool.
# eloipool_config (path): Set to /usr/local/etc/eloipool.conf
# by default.
command_args="> /dev/null 2>&1 &"
Some other changes include how you specify the IP's. In this version I forced everything to just IPv4 because I was having some issues with IPv6:
# Bitcoin p2p server for announcing blocks found
UpstreamBitcoindNode = ('127.0.0.1', 8333) #
JSONRPCAddresses = (
# Addresses to listen on for Stratum mining server
StratumAddresses = (
# Addresses to listen on for Bitcoin node
# Note this will only be used to distribute blocks the pool finds, nothing else
BitcoinNodeAddresses = (
Once I get more familiarized with Python I would put back the IPv6 support. Something I could not get working was MySQL support.
Installing the Dependencies
You can install Python3 from the ports collection:
Then you can simply download and extract the additional Python modules in the eloipool root directory (I installed it in "/usr/local/eloipool"). Python will automatically pick those up.
To get the optional "midstate" library to compile,
You just have to adjust the first few lines of the Makefile:
CFLAGS = -march=native -Wall -funroll-all-loops -O3 -fstrict-aliasing -Wall -std=c99 -I/usr/local/include/python3.3m -L/usr/local/lib
LDFLAGS = -Wl,-O1 -Wl,--as-needed -lpython3.3m
Then just copy the "midstate.so" file into the eloipool root directory.