2014-05-25 14:35:32 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
## This script executes supybot-botchk and sets correct environment.
|
|
|
|
|
|
|
|
## Example entries for crontab:
|
2014-05-29 19:21:32 +02:00
|
|
|
#*/5 * * * * /usr/bin/env -i /home/YOURUSERNAME/.local/bin/supybot-botchk-cron
|
|
|
|
#*/5 * * * * /usr/bin/env -i /home/users/YOURUSERNAME/.local/bin/supybot-botchk-cron
|
2014-05-25 14:35:32 +02:00
|
|
|
|
|
|
|
## Making sure that we use UTF-8.
|
|
|
|
export LC_ALL=en_US.utf8
|
|
|
|
|
|
|
|
## This sets timezone which the bot will use. UTC is probably sane default.
|
2014-05-25 14:44:23 +02:00
|
|
|
export TZ="/usr/share/zoneinfo/UTC"
|
2014-05-25 14:35:32 +02:00
|
|
|
|
|
|
|
## Setting $PATH correctly so executing system commands work.
|
|
|
|
## The easiest way to get this correct is probably to execute the command
|
|
|
|
## below
|
|
|
|
#echo export PATH=$PATH
|
|
|
|
export PATH=
|
|
|
|
|
2014-05-25 15:04:24 +02:00
|
|
|
## Put the FULL paths below.
|
2014-05-25 14:35:32 +02:00
|
|
|
export SB_BC_C_SUPYBOT_BOTCHK=
|
|
|
|
export SB_BC_C_BOTDIR=
|
|
|
|
export SB_BC_C_PIDFILE=
|
|
|
|
export SB_BC_C_SUPYBOT=
|
|
|
|
export SB_BC_C_CONFFILE=
|
|
|
|
|
|
|
|
## You don't need to change this line, everything is set above.
|
|
|
|
$SB_BC_C_SUPYBOT_BOTCHK --botdir=$SB_BC_C_BOTDIR --pidfile=$SB_BC_C_PIDFILE --supybot=$SB_BC_C_SUPYBOT --conffile=$SB_BC_C_CONFFILE $1
|
|
|
|
|
2014-05-25 15:04:24 +02:00
|
|
|
## To debug this script, add --verbose to the end while running in
|
|
|
|
## terminal.
|
2014-05-25 14:35:32 +02:00
|
|
|
|
|
|
|
## vim : set ft=sh :
|