I am using this using until to restart a process to monitor and restart a conky instance. But when it redraws it draws over the previous instance without wiping it first. So how do I get it to clean the screen and then respawn the conky instance. I've also had a look at how do i write a bash script to restart a process if it dies, but the problem lies that when the script is respawned it hasn't cleared the first instance of conky, so it writes it over the top again. So I've come up with this script
#!/bin/bash -e
until conkystat; do
echo "Server 'conkystat' crashed with exit code $?. Respawning.." >&2
echo -en "\ec"
conky -dc ~/.conky/.conkyrc-basic
sleep 15
done
But this still has the same problem of redrawing over the previous text.
So how can I do it please?
Thanks
Sharon.