Skip to content

Instantly share code, notes, and snippets.

@sgharvey
Last active March 30, 2021 15:16
Show Gist options
  • Save sgharvey/c9cbec1b694c712e92ac6ba7526aa25c to your computer and use it in GitHub Desktop.
Save sgharvey/c9cbec1b694c712e92ac6ba7526aa25c to your computer and use it in GitHub Desktop.
systemd unit for chia
[Unit]
Description=Chia
After=syslog.target network.target
[Service]
Type=oneshot
RemainAfterExit=yes
User={USER}
WorkingDirectory=/home/{USER}/chia-blockchain/
Environment="PATH=/home/{USER}/chia-blockchain/venv/bin"
ExecStart=/home/{USER}/chia-blockchain/venv/bin/chia start farmer
ExecStop=/home/{USER}/chia-blockchain/venv/bin/chia stop -d all
ExecReload=/home/{USER}/chia-blockchain/venv/bin/chia start -r farmer
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment