LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   restart application if it dies (https://www.linuxquestions.org/questions/linux-general-1/restart-application-if-it-dies-236490/)

N_A_J_M 09-28-2004 11:46 PM

restart application if it dies
 
i have installed x11vnc ... and it works perfectly.. i have it starting up when x is started, but the only problem is that if a client disconnects the server service dies... so i have to type x11vnc in the console again for the server to be restarted..

is there a way i can set it to restart if this happens?

cheers
Jurgen

slyman 09-29-2004 12:40 AM

I do a simlar thing with webmin.

I run the following via cron every 5 mins:

Code:

[ -z "`ps -A | grep miniserv.pl`" ] && /etc/webmin/start
You will need to replace miniserv.pl with whatever the process is called and /etc/webmin/start with the command to start x11vnc.

However, I suspect there is an option so that x11vnc does not end when the last client disconnects - I don't actually know x11vnc.

Use both and you'll cover about as many situations as you can.

Tinkster 09-29-2004 01:31 AM

http://www.yolinux.com/HOWTO/Process-Monitor-HOWTO.html
Has a few nice other methods than the cron-job...


Cheers,
Tink

N_A_J_M 09-30-2004 03:29 PM

awesome, cheers guys thats just what i am after!!

Tinkster 09-30-2004 06:18 PM

Pleasure mate! :)

How's Whangarei today?

Btw, are you German or something? Just
because of your name... :)


Cheers,
Tink


All times are GMT -5. The time now is 09:11 AM.