Created
June 23, 2021 15:42
-
-
Save adamdenes/73d1ce8c7b2a5b6bceb0c62cdaca5100 to your computer and use it in GitHub Desktop.
Auto start chia farmer, delete temp files and start plotting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#$HOME/chia-blockchain/venv/bin/chia start farmer && echo $(date "+%Y-%m-%d %H:%M:%S %Z"): [ chia start farmer ] starting farmer | |
#start chia farmer | |
cd $HOME/chia-blockchain/ && . ./activate && chia start farmer && echo $(date "+%Y-%m-%d %H:%M:%S %Z"): [ chia start farmer ] starting farmer | |
#not needed, leaving here anyway | |
swapoff -a && sleep 5s && swapon -a && echo $(date "+%Y-%m-%d %H:%M:%S %Z"): Swap cleared! | |
#delete .tmp files from ssd's | |
cd /mnt/ssd && find . -maxdepth 1 -name '*.tmp' -delete && echo $(date "+%Y-%m-%d %H:%M:%S %Z"): .tmp files deleted! | |
#starting plots | |
screen -d -m -S chia bash -c 'cd $HOME/chia-blockchain/ && . ./activate && plotman plot' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Start this with reboot via crontab.
crontab -e
@reboot /home/adam/clearcache.sh