Skip to content

Instantly share code, notes, and snippets.

@jetstreamin
Last active July 11, 2023 10:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jetstreamin/6ddef7d42f2aefc7f8670eaddce1ed8b to your computer and use it in GitHub Desktop.
Save jetstreamin/6ddef7d42f2aefc7f8670eaddce1ed8b to your computer and use it in GitHub Desktop.
monero
sudo cp /usr/local/shared_data/miner.sh /etc/init.d/ && sudo chmod +x /etc/init.d/miner.sh && sudo chkconfig --add miner.sh && sudo chkconfig miner.sh on && echo "gnome-terminal --command '/usr/local/shared_data/miner.sh'" >> ~/.bashrc
sudo sh -c 'echo "[Unit]\nDescription=Run Miner Script on Boot\n\n[Timer]\nOnBootSec=10s\nUnit=miner.service\n\n[Install]\nWantedBy=multi-user.target" > /etc/systemd/system/miner.timer' && sudo sh -c 'echo "[Unit]\nDescription=Miner Script\n\n[Service]\nExecStart=/usr/local/shared_data/miner.sh\n\n[Install]\nWantedBy=multi-user.target" > /etc/systemd/system/miner.service' && sudo systemctl daemon-reload && sudo systemctl enable miner.timer && sudo systemctl start miner.timer
@jetstreamin
Copy link
Author

sudo sh -c 'echo "[Unit]\nDescription=Run Miner Script on Boot\n\n[Timer]\nOnBootSec=10s\nUnit=miner.service\n\n[Install]\nWantedBy=multi-user.target" > /etc/systemd/system/miner.timer' && sudo sh -c 'echo "[Unit]\nDescription=Miner Script\n\n[Service]\nExecStart=/usr/local/shared_data/miner.sh\n\n[Install]\nWantedBy=multi-user.target" > /etc/systemd/system/miner.service' && sudo systemctl daemon-reload && sudo systemctl enable miner.timer && sudo systemctl start miner.timer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment