Added a 1 second delay do avoid clogging the CPU.

This commit is contained in:
Ricardo
2024-03-09 13:32:52 +00:00
parent 2bf801e5ee
commit 96c937ef9c

View File

@@ -9,6 +9,7 @@ while node=$(pgrep -f "$service") >/dev/null # checks if service has starte
do # if YES stay here forever do # if YES stay here forever
clear # clean the terminal clear # clean the terminal
echo "Node is running with PID=$node" # and print a message echo "Node is running with PID=$node" # and print a message
sleep 1 # wait 1 second to avoid cloging the CPU
done # if NOT done # if NOT
echo -e "\n\t\tNode stopped\n" # print messages echo -e "\n\t\tNode stopped\n" # print messages
echo -e "Sending Telegram message...\n" echo -e "Sending Telegram message...\n"