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


On 10/31/07, VeeJay  wrote:
> I am running a status script written in Perl (*status.pl*) and want to have
> it *Always Running*.
>
>
>
> How can I check through CRON that "status.pl" is running and if NO, then
> start the script execution again?
>

Run monit.

http://www.freshports.org/sysutils/monit/

Here's an example config for making sure sshd is running:

$ cat /etc/monit.d/sshd
check process sshd with pidfile /var/run/sshd.pid
  start program  "/etc/init.d/sshd start"
  stop program  "/etc/init.d/sshd stop"
  if failed port 22 protocol ssh then restart
  if 5 restarts within 5 cycles then timeout

- --
Andy Harrison
public key: 0x67518262
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: http://firegpg.tuxfamily.org

iD8DBQFHKHeKNTm8fWdRgmIRAoZGAJ0ZJCzDedOEzVqJFYlniZshPKJmPwCaA8Uh
pPYRFCDdrIk1YgYPcyH0hew=
=dr1X
-----END PGP SIGNATURE-----
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to