ircd.cron.in
0,10,20,30,40,50 * * * * @IRCDDIR@/ircdcron/ircdchk >/dev/null 2>&1
ircdchk.in
#!/bin/sh
#
# UnrealIRCD Crontab v2.1
# $Id$
#
# This is a script suitable for use in a crontab. It checks to make sure
# your ircd is running. YOU NEED A SEPARATE CRON JOB FOR EACH IRCD. If your
# ircd isn't found, it'll try to start it back up.
#
# You'll need to edit this script for your ircd.
#
# To check for your ircd every 10 minutes, put the following line in your
# crontab:
# 0,10,20,30,40,50 * * * * /home/mydir/ircdchk
# And if you don't want to get email from crontab when it checks you ircd,
# put the following in your crontab:
# 0,10,20,30,40,50 * * * * /home/mydir/ircdchk >/dev/null 2>&1
#
# change this to the mail address to mail output to:
# MAIL=me
# These values shouldn't need to be changed
# The path to the ircd binary
ircdexe="@BINDIR@"
# The path to the ircd pid file
ircdname="@IRCDDIR@/ircd.pid"
########## don't change anything below here ##########
if test -r $ircdname; then
# there is a pid file -- is it current?
ircdpid=`cat $ircdname`
if `kill -CHLD $ircdpid >/dev/null 2>&1`; then
# it's still going
# back out quietly
exit 0
fi
echo "UnrealIRCd Crontab notice:"
echo ""
echo "Stale $ircdname file (erasing it)"
rm -f $ircdname
fi
echo ""
echo "Couldn't find the ircd running. Reloading it..."
echo ""
$ircdexe
Showing posts with label crontab. Show all posts
Showing posts with label crontab. Show all posts
Thursday, August 8, 2013
How to setup crontab for psyBNC
First thing to do is you must edit psbncchk file in your psyBNC folder.
Search for this line:
Change the path into your psyBNC path, look at this example:
Save the file and exit the editor.
Change the default editor by using this command:
Next step is editing the crontab file:
Insert this line to the file:
Remember, change the path to your psybnc path.
This crontab command means it will run the psybncchk file every 10 minutes.
$ nano psybncchkSearch for this line:
PSYBNCPATH=/home/zemra/psybncChange the path into your psyBNC path, look at this example:
PSYBNCPATH=/home/zemra/psybncSave the file and exit the editor.
Change the default editor by using this command:
$ export EDITOR=nanoNext step is editing the crontab file:
$ crontab -eInsert this line to the file:
0,10,20,30,40,50 * * * * /home/zemra/psybnc/psybncchk >/dev/null 2>&1Remember, change the path to your psybnc path.
This crontab command means it will run the psybncchk file every 10 minutes.
How to setup Crontab for an Eggdrop?
PART 1:
"botchk" setup
locate the botchk file in the bots main dir.
type -> pico botchk
You need to edit 4 things in the "botchk"
# change this to the directory you run your bot from:
botdir="/usr/home/user/botdir/"
# change this to the name of your bot's script in that directory:
botscript="./eggdrop eggdrop.conf"
# change this to the nickname of your bot (capitalization COUNTS)
botname="BotNick"
# change this to the name of your bot's userfile (capitalization COUNTS)
userfile="bot.user"
type -> ctrl+o Save the file
type -> ctrl+x exit pico
PART 2:
Setting up the crontab file
type -> pico crones this will be your crontab file
type -> 0,10,20,30,40,50 * * * * /home/user/botdir/botchk >/dev/null 2>&1
- ^--(1) ^--(2) ^--(3) ^--(4)
- 1. time in (minutes) it will check to see if the bot is running
2. tells it to run every hour/day of month/month/year
3. full system path to the location of your botchk file
4. tells the system not to send you mail everytime crontab loads the bot or checks to see if the bot is running (this is a good idea because some sys admins might get upset with all of the emails)
type -> ctrl+o Save the file
type -> ctrl+x exit pico
type -> crontab crones This will load the file "crones" into your crontab. You can check your crontab by typing "crontab -l"
"botchk" setup
locate the botchk file in the bots main dir.
type -> pico botchk
You need to edit 4 things in the "botchk"
# change this to the directory you run your bot from:
botdir="/usr/home/user/botdir/"
# change this to the name of your bot's script in that directory:
botscript="./eggdrop eggdrop.conf"
# change this to the nickname of your bot (capitalization COUNTS)
botname="BotNick"
# change this to the name of your bot's userfile (capitalization COUNTS)
userfile="bot.user"
type -> ctrl+o Save the file
type -> ctrl+x exit pico
PART 2:
Setting up the crontab file
type -> pico crones this will be your crontab file
type -> 0,10,20,30,40,50 * * * * /home/user/botdir/botchk >/dev/null 2>&1
- ^--(1) ^--(2) ^--(3) ^--(4)
- 1. time in (minutes) it will check to see if the bot is running
2. tells it to run every hour/day of month/month/year
3. full system path to the location of your botchk file
4. tells the system not to send you mail everytime crontab loads the bot or checks to see if the bot is running (this is a good idea because some sys admins might get upset with all of the emails)
type -> ctrl+o Save the file
type -> ctrl+x exit pico
type -> crontab crones This will load the file "crones" into your crontab. You can check your crontab by typing "crontab -l"
Subscribe to:
Posts (Atom)