New Message: Re: Keep the web server running?

webmaster at userland.com webmaster at userland.com
Tue Apr 4 13:14:50 CDT 2006


A new message was posted:

Address: http://manila.userland.com/discuss/msgReader$1706

By: Lawrence Lee (lawrence at userland.com)

You could create a new script in the user.scheduler.everyMinute table with the following:

bundle { //check that the Web server is running
 if not defined (system.temp.Frontier.serverStopped) {
 system.temp.Frontier.serverStopped = false};
 try { //check if the server is set to start on startup and if it's not running, start it
 if system.temp.Frontier.serverStopped != true {
 local (adrTable = @user.inetd.config.http);
 if not inetd.isDaemonRunning (adrTable) {
 inetd.startOne (adrTable)}}}
 else {
 tcp.sendmail ("name at mysite.com", tcp.dns.getMyDottedId () + string (tryerror))}}

Notes

1. Optional, you can configure Manila to email yourself if the Web server isn't responding.

2. The script checks for a value at system.temp.Frontier.serverStopped which allows you to set this to true if you want to do maintenance etc. and require the Web server not to be restarted.

This is a Manila site... http://manila.userland.com/.




More information about the Manila-Users mailing list