[Xitami] Xitmai restart utility/daemon

Simon xitami@lists.xitami.org
Mon, 10 Nov 2003 02:15:33 +0000


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello Tom,

On Sun, 9 Nov 2003 20:19:01 -0500 your time, you said:

TB> I just named mine xitami.bat (irrelevant, really), and launch that
TB> INSTEAD of launching Xitami directly.

Sorry,  I  misunderstood  you.  I was assuming that the process was an
automatic one and that the batch file was called by Xitami. Thanks for
your  suggestion  though,  but  I  really  wanted something that would
restart Xitami without any intervention from me. However, I did manage
to put together a rough workaround that didn't cost anything.

First  of all I downloaded a free program called Active Server Watcher
from here: http://www.ntutility.com/freeware_2.html.

Then I downloaded this free command line utility called 'process' from
here: http://www.beyondlogic.org/consulting/processutil/processutil.htm

'Active  Server  Watcher'  monitors  web resources so I created a page
called  poll.htm  under  Xitami  and  set  ASW  to poll that every few
minutes. If the page becomes unavailable I have set ASW to test 5 more
times  before  running  an external file. The file is xigui32.bat (see
below).  However,  I didn't want to just load a new instance of Xitami
just  because  a  page  wasn't  reachable because as it may be totally
unrelated  to Xitami, and could after all be DNS or temp network fault
etc. So I use the freeware commandline file 'process' to terminate any
running instance of xigui32.exe first and then the batch reloads a new
instance, making certain that only one instance of Xitami is running.

- --- BEGIN xigui32.bat

BEGIN:
X:
cd X:\[path]\Xitami
goto KILL

:KILL
process.exe -k xigui32.exe
goto RESTART

:RESTART
start xigui32.exe
goto END

:END
- --- END xigui32.bat

This works fine. It may not be the 'cleanest' way to do it but it is a
workaround.

- --
Sl=E1n,

 Simon @ i~n+f~o+w~i+z~a+r~d+.~c+o~.+u~k

*****************************************
PGP Key via Web:   http://pgp.infowizard.co.uk/
PGP Key via Email: getpgpkey@infowizard.co.uk


#1969. Arum Qed Swirl Soy =B6

-----BEGIN PGP SIGNATURE-----
Comment: Protect your Privacy with PGP.
Comment: KeyID: 0xDF8062C1
Comment: Fingerprint: 40DD 7908 9DF8 634F 1B98  8849 9266 C870 DF80 62C1

iQA/AwUBP670yZJmyHDfgGLBEQJ6AgCggehS5BvHR+6OSWFNMy4/bzmGz6wAoKp4
/ZajK2E64HeA68uSEbN54R9H
=3Dqgd5
-----END PGP SIGNATURE-----