Last active
April 9, 2020 23:23
-
-
Save buzzkillb/6442d9bd3cac148585116571ea175927 to your computer and use it in GitHub Desktop.
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 | |
#denarius.io - Denarius Cryptocurrency [FortunaStake] | |
#checks every 30 minutes if a fortunastake has "notfound" status and restarts if found inactive, leave running in the background or in screen. | |
#chmod +x monitorfs.sh | |
#to run ./monitorfs.sh | |
#change password to your walletpassword | |
#adjust daemon wallet binary to your setup | |
#snap -> denarius.daemon | |
#compiled -> denariusd | |
# | |
while true; do | |
denarius.daemon walletpassphrase "password" 500 | |
denarius.daemon fortunastake status | jq -r '.[] | select(.status=="notfound") | .alias,.status ' | ( | |
while read alias; do | |
read status | |
echo 'alias:' $alias | |
echo 'status:' $status | |
denarius.daemon walletpassphrase "password" 500 | |
denarius.daemon fortunastake start-alias $alias | |
done | |
) | |
#30min timer with countdown for next loop | |
(for (( timer=1800; timer>0; timer--)); do | |
sleep 1 & | |
printf " $timer \r" | |
wait | |
done) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment