Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can I make a swiki server reboot automatically whenever it crashes?

0
Posted

How can I make a swiki server reboot automatically whenever it crashes?

0

(I assume you not really mean to reboot the machine but to restart the server) First write a script that repeatedly starts the swiki: =#! /bin/sh =while true ; do squeakcomanche swiki.image ; done This assumes you rename your VM to squeakcomanche which is usefull because it stands out in the process list. Then write another script that checks if it is still responding and kills it eventually: =#! /bin/sh =wget -q -O /dev/null -T 20 http://localhost:8080/ || killall squeakcomanche This sets the timeout to 20 seconds. Then you put this script into a cron job or make it loop with a sleep 300 delay so it checks every 5 minutes if everything is okay. OTOH, my server runs fine for weeks – you should try another VM if it keeps crashing.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123