Imam shell na faksu odakle vrtim eggdropa ... bio je uvijek problem to sto je ubijao sve procese nazvane eggdrop , naravno preimenujem proces i sredjen problem!Sada su uveli to da ubijaju sve na portu 6667 , to bi se moglo zaobici sa
autobotchk Conf -dir /home/botdir -noemail ... no neradi !Zanima me dali neko moze napraviti malu shell skriptu koja bi provjeravala svako 5 minuta jeli eggdrop podignut (dali ima tog procesa) i ako nema podizala ga sama!!!
Ako neko ima nesto takvo ili moze napisati nevjerujem da treba nesto prezahtjevno bio bi jako zahvalan :))
Potpis
#! /bin/sh
#
# botchk
#
# $Id: botchk,v 1.5 2001/09/28 14:07:25 guppy Exp $
#
# This is a script suitable for use in a crontab. It checks to make sure
# your bot is running. YOU NEED A SEPARATE CRON JOB FOR EACH BOT. If your
# bot isn't found, it'll try to start it back up.
#
# You'll need to edit this script for your bot.
#
# To check for your bot every 10 minutes, put the following line in your
# crontab:
# 0,10,20,30,40,50 * * * * /home/mydir/mybot/botchk
# And if you don't want to get email from crontab when it checks you bot,
# put the following in your crontab:
# 0,10,20,30,40,50 * * * * /home/mydir/mybot/botchk >/dev/null 2>&1
#
# change this to the directory you run your bot from:
botdir="/home/mydir/mybot"
# change this to the name of your bot's script in that directory:
botscript="mybot"
# change this to the nickname of your bot (capitalization COUNTS)
botname="LamestBot"
# change this to the name of your bot's userfile (capitalization COUNTS)
userfile="LamestBot.user"
# change this to the name of your bot's pidfile (capitalization COUNTS)
pidfile="pid.LamestBot"
########## you probably don't need to change anything below here ##########
cd $botdir
# is there a pid file?
if test -r $pidfile
then
# there is a pid file -- is it current?
botpid=`cat $pidfile`
if `kill -CHLD $botpid >/dev/null 2>&1`
then
# it's still going -- back out quietly
exit 0
fi
echo ""
echo "Stale $pidfile file, erasing..."
rm -f $pidfile
fi
if test -r CANTSTART.$botname
then
if test -r $userfile || test -r $userfile~new || test -r $userfile~bak
then
echo ""
echo "Userfile found, removing check file 'CANTSTART.$botname'..."
rm -f CANTSTART.$botname
fi
fi
# test if we have run botchk previously and didn't find a userfile
if test ! -f CANTSTART.$botname
then
echo ""
echo "Couldn't find bot '$botname' running, reloading..."
echo ""
# check for userfile and reload bot if found
if test -r $userfile
then
# It's there, load the bot
./$botscript
exit 0
else
if test -r $userfile~new
then
# Bot f*@!ed up while saving the userfile last time. Move it over.
echo "Userfile missing. Using last saved userfile..."
mv -f $userfile~new $userfile
./$botscript
exit 0
else
if test -r $userfile~bak
then
# Userfile is missing, use backup userfile.
echo "Userfile missing. Using backup userfile..."
cp -f $userfile~bak $userfile
./$botscript
exit 0
else
# Well, nothing to work with...
echo "No userfile. Could not reload the bot..."
echo "no userfile" > CANTSTART.$botname
exit 1
fi
fi
fi
fi
To je autobotchk skripta na svim eggdropima:) nazalost ona neradi na ovom serveru nesto nestima nisam sad u mogucnosti da pejstam u cemu je problem,al uglavnom neradi:) Svejedno hvala na trudu!!!
Potpis
nema na cemu, samo mi nismo u mogucnosti da ti pomognemo ako nam detaljno ne kazes u cemu je problem, a i da to je skripta koja ide uz svaki eggdrop, ali posto si trazio istu pretpostavio sam da je nemas ili da je nisi video.. :)
output kad startujes skriptu mozes da snimis u fajl sa >> redirekcijom pa onda okaci to ovde i videcemo u cemu je problem.
Ja bih samo dodao da 6667 nije jedini (kao sto se ocigledno misli) port za IRC. Kad doticni momak ode na server na koji najcesce ide, nek kuca /stats p i vidi portove koje "slusa" server, na svaki od njih moze da se konektuje (osim ako je admin servera izricito zabranio, sto je redak slucaj)....
Potpis
Promjeni file eggdrop u nesto drugo, admin izlistava sve procese i ako vidi eggdrop onda killa, promjeni npr u rotkvica i onda loudas ./rotkvica bot.conf ...
Potpis
liban0n:
Imam shell na faksu odakle vrtim eggdropa ... bio je uvijek problem to sto je ubijao sve procese nazvane eggdrop , naravno preimenujem proces i sredjen problem!Sada su uveli to da ubijaju sve na portu 6667 , to bi se moglo zaobici sa
autobotchk Conf -dir /home/botdir -noemail ... no neradi !Zanima me dali neko moze napraviti malu shell skriptu koja bi provjeravala svako 5 minuta jeli eggdrop podignut (dali ima tog procesa) i ako nema podizala ga sama!!!
Ako neko ima nesto takvo ili moze napisati nevjerujem da treba nesto prezahtjevno bio bi jako zahvalan :))