eggdrop tcl

contrab para eggdrop, tareas automatizadas contrab para eggdrop

« Older   Newer »
  Share  
view post Posted on 11/6/2014, 04:32     +1   -1
Avatar

Dudas, sugerencias, saludos /server 198.251.89.91:7005 1

Group:
Administrator
Posts:
412
Reputation:
+93
Location:
Trinidad -Beni - Bolivia my passion is DALnet

Status:


################ paso 1 ################
en nuestro directorio shells ejemplo en mi bot
/home/sedinne/kantuta
ahi creamos un archivo llamado asi Kantu.botchk y dentro de dicho archivo
lo configuramos asi: (lo de abajo editalo con tus datos de tus bot)

####### ejemplo de automatizacion archivo a subir en la shells ####
para que funcione bien este sector de auto incio solo reemplaza lo siguiente;

botdir="/home/sedinne/kantuta" << ruta o directorio de tu eggdrop
botscript="eggdrop Kantuta.conf" << ruta donde pegaste el Kantu.botchk
botname="Kantuta" << nombre del tu bot, ese dato esta en tu .conf
userfile="Kantuta.user" << este dato los sacas de tu .conf
pidfile="pid.Kantuta" << este dato los sacas de tu .conf

otro punto a notar por defecto el eggdrop usa eggdrop.conf pero yo lo uso asi Kantuta.conf si vas a usar por defecto entonces cambia a esto botscript="eggdrop eggdrop.conf"

CODE
# change this to the directory you run your bot from (capitalization COUNTS):
botdir="/home/sedinne/kantuta"

# change this to the name of your bot's config file (capitalization COUNTS):
botscript="eggdrop Kantuta.conf"

# change this to the botnet-nick of your bot (capitalization COUNTS):
botname="Kantuta"

# change this to the name of your bot's userfile (capitalization COUNTS):
userfile="Kantuta.user"

# change this to the name of your bot's pidfile (capitalization COUNTS):
pidfile="pid.Kantuta"

########## 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

exit 0


################ paso 2 ################
una vez subido ese archivo ya editado con nuestros datos damos
permisos administrativos a Kantu.botchk
en nuestro programa segure shells ejecutamos los siguientes comandos:
cd /home/sedinne/kantuta
y luego damos el permiso asi chmod +x Kantu.botchk

################ paso 3 ################
una vez dados los permisos administrativos para que la tarea arranque ahora
pasamos a programar en si la tarea:
Para editar la lista de crones:

crontab -e
....añadiendo contrab cada 10 minutos.... para que verifique en 10 minutos si el proceso esta activo
*/10 * * * * /home/sedinne/kantuta/Kantu.botchk >/dev/null 2>&1
ahi nos dice que la tarea verificara cada 10 minutos si esta activa o no
para salir del editor damos los comandos control +o
luego enter y damos el comandos control +x
con ese ultimo comando salimos del editor
..................................
y listo nuestra tarea esta lista y funcionando

otros comandos adicionales:
para ver la lista de crones (tareas) que tenemos programadas:

crontab -l

para eliminar todas las tareas que tengamos en general

crontab -r

################ fin del tutorial contrab para eggdrop ################

Edited by Sedition - 5/7/2020, 22:26
 
Contacts  Top
view post Posted on 20/12/2021, 11:14     +1   -1

Junior Member

Group:
Member
Posts:
19
Reputation:
+2

Status:


Hola sedition no entendí realmente para que sirve eso.. por ejemplo mi bot cuando conecto al chat veo que se a caído y no a regresado valdría para eso?
 
Top
view post Posted on 23/12/2021, 02:32     +1   -1
Avatar

Dudas, sugerencias, saludos /server 198.251.89.91:7005 1

Group:
Administrator
Posts:
412
Reputation:
+93
Location:
Trinidad -Beni - Bolivia my passion is DALnet

Status:


las tareas contrab se utilizan para programar autoinicio de procesos, cuando en tu vps hacen mantenimiento o reiniciaron toda tu vps y ahi se auto programa con contrab para que quede como tarea pendiente y levante procesos en este caso un eggdrop, para mas informacion busque en google con el tema CONTRAB en eggdrop
 
Contacts  Top
view post Posted on 29/12/2021, 18:08     +1   -1
Avatar

Bifrost

Group:
Member
Posts:
24
Reputation:
+1
Location:
Perú

Status:


Saludos KoDi, también se usa para eso, programas el crontab para que tu eggdrop se autoinicie automáticamente, puedes usar el crontab, para eggdrop, para ircd, para znc, para servicios, para kiwiirc, etc. Si deseas lo podemos ver KoDi, avísame para coincidir en la hora.
 
Contacts  Top
3 replies since 11/6/2014, 04:32   228 views
  Share