Skip to content

Instantly share code, notes, and snippets.

@alexanderbez
Last active August 10, 2018 23:23
Show Gist options
  • Save alexanderbez/5e0e9bdca1cd5ef4f322e08fb1e64cfd to your computer and use it in GitHub Desktop.
Save alexanderbez/5e0e9bdca1cd5ef4f322e08fb1e64cfd to your computer and use it in GitHub Desktop.
A simple systemd service definition for Ethminer.
[Unit]
Description=Ethereum mining service
Requires=multi-user.target
After=multi-user.target
[Service]
User=aleks
Type=simple
WorkingDirectory=$HOME/miners/ethminer
EnvironmentFile=$HOME/miners/ethminer/env
ExecStart=$HOME/miners/ethminer/ethminer -U -P stratum1+ssl://${ETH_WALLET}.${WORKERNAME}@us1.ethermine.org:5555 -HWMON 0 --farm-recheck 2000 --exit
ExecReload=/bin/kill -HUP $MAINPID
ExecStop=/bin/kill -15 $MAINPID
Restart=on-failure
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=ethminer
[Install]
WantedBy=default.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment