Skip to content

Instantly share code, notes, and snippets.

@vanities
Last active May 9, 2018 03:26
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 vanities/8dfa9041121e77801762c626cc9e4fa1 to your computer and use it in GitHub Desktop.
Save vanities/8dfa9041121e77801762c626cc9e4fa1 to your computer and use it in GitHub Desktop.
watch coins
#!/bin/bash
new_config=0
old_config=0
remote_file="/home/ethos/remote.conf"
remote_url=$(cat $remote_file)
while true; do
new_config=$(wget -qO- $remote_url)
if [ "$new_config" != "$old_config" ] && [ "$old_config" != 0 ];
then
#echo "changes made... changing coins"
/opt/ethos/bin/putconf
/opt/ethos/bin/minestop
/opt/ethos/bin/minestart
fi
old_config="$new_config"
sleep 10
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment