0

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.

Community
  • 1
  • 1
boudiccas
  • 297
  • 3
  • 13

1 Answers1

0

you can try adding 'killall conky' to completely terminate the previous running instance of the program before calling the new one. Not sure if this will work but its worth a try.