How can I make the autobotchk mail me at bot@foo.com if the bot has gone down?
I tried -mail bot@foot.com instead of -noemail, but it didnt work.. Anyone?
The simplest method, will be to set up redirection for your shell e-mail, than doing anything else.
E-mail is not sent by the botchk script.
E-mail is sent by the cron demon. It does this by senidng anything sent to STDOUT, in a e-mail to, to your username on the shell.
As such, you can redirect all e-mails sent to your shell, to another address. How this is done, you are best speaking to your shell provider, to see how this can be aranged.
So it isnt possible to do it with crontab then? Couse I am my shell provider, and I dont know how to forward emails. And I would like to do this with crontab. . Thank you for all your help
The autobotchk script, is designed to create a "botchk" script, tailered to your bot, it then inserts a line in your crontab to load it. Nothing more.
The botchk script, will check if the bot is running. If not, load it, if so, simply exit the script.
The crond program, which runs the script at specific times, will e-mail any output the scripts produce, to the mailbox setup you userX on that shell. userX is the username of persons crontab it is working on.
As noted, e-mail redirection on the shell will forward it on.
It is the crond doeing the e-mailing, not the botchk, or autobotchk script.
The -noemail option, simply redirects the test to nowhere, instead of into the buffer that is used to make the e-mail.
Another method, as well as mail re-direction, is to setup the botchk script to redirect output into a specific file, a second crond script will then detect if the file exists, if so, that script is designed to send mail to other addresses.