Hi - sometimes when my bot times out, the pid dosn't get erased and therefore the crontab can't restart it.
Is there a way to make sure the pid disappears everytime the bot gets cut off?
Thanks.
Just because your Eggdrop timed out from the IRC server, it doesn't mean that Eggdrop needs to be restarted. It'll automatically realize that it's not connected to the server and try to jump or reconnect.
There is one exception to what's been mentioned above:
If you are running some very poorly written script that takes very long time to complete, this will render your bot unresponsive (such as running pisg through your eggdrop with some scripts, etc). In this case the options are either to wait for the script to complete, or kill/restart.
Back to the request tho, I did write a watchdog-capable replacement for the botchk/autobotchk crontab script a long time ago. If your bot is disconnecting due to a script freezing your eggie, this should do what you ask for. Still, you'd be better off finding, and fixing, the cause for the freeze. It will, however, not take any actions if your eggdrop is still responsive (although might not be connected to a server).