#!/bin/bash
cat <<'EOF'>> chia_farmer.service
[Unit]
Description=Chia Farmer
Wants=network-online.target
After=network.target network-online.target
StartLimitIntervalSec=0
[Service]
Type=forking
Restart=always
RestartSec=1
User=wareck
Environment=PATH=/home/wareck/chia-blockchain/venv/bin:${PATH}
ExecStart=/usr/bin/env chia start farmer -r
ExecStop=/usr/bin/env chia stop all -d
[Install]
WantedBy=multi-user.target
EOF
