press x to stop monitoring

This commit is contained in:
rootzoll 2019-01-28 15:51:50 +01:00
parent f7a06d9096
commit 6f788591cf

View file

@ -48,11 +48,20 @@ while [ ${finished} -eq 0 ]
echo "REINDEXING BLOCKCHAIN"
echo "*************************"
echo "THIS CAN TAKE SOME LONG TIME"
echo "If you dont see any progress after 24h press X to stop."
echo "If you dont see any progress after 24h keep X pressed to stop."
#TODO: detect and display progress
#TODO: determine when finished and then finished=1
# wait 2 seconds for key input
read -n 1 -t 2 keyPressed
# check if user wants to abort monitor
if [ "${keyPressed}" = "x" ]; then
echo "stopped by user ..."
break
fi
done
# trigger reboot when finished