Skip to content

Instantly share code, notes, and snippets.

@buzzkillb
Last active April 9, 2020 23:23
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 buzzkillb/6442d9bd3cac148585116571ea175927 to your computer and use it in GitHub Desktop.
Save buzzkillb/6442d9bd3cac148585116571ea175927 to your computer and use it in GitHub Desktop.
#!/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