Cron job

From UnrealIRCd documentation wiki
Jump to: navigation, search

Usually you want to make sure UnrealIRCd starts on system startup or restarts after a crash. See below.

UnrealIRCd 4.0.1 and higher

  • Run crontab -e to edit your crontab. It will fire up an editor.
  • Add the following two lines to the file (make sure there is an enter at the end):
*/5 * * * * /home/yourusername/unrealircd/unrealircd croncheck
@reboot /home/yourusername/unrealircd/unrealircd croncheck
  • Save it. Done!

The first line makes the unrealircd script check if UnrealIRcd is running every five minutes (hence the */5). The second line will ensure that UnrealIRCd is started as soon as possible after the system has rebooted (hence the @reboot). It's possible to do without the 2nd line but then it may take up to 5 minutes after a reboot for the IRCd to be started.

You can also add the following line at the top of your crontab to make sure you are e-mailed whenever UnrealIRCd is (re)started through cron:

MAILTO=xxxx@xxxxxx.com

Previous versions (4.0.0)

NOTE: If you are on 4.0.1 or higher then don't follow below. Read the text above instead.

In UnrealIRCd's 4.0.0 release the cron script was broken. As a workaround you can put the following in crontab -e. This will only ensure that UnrealIRCd is started after a reboot (not after a crash):

@reboot /home/yourusername/unrealircd/unrealircd start