################ paso 1 ################en nuestro directorio shells ejemplo en mi bot
/home/sedinne/kantutaahi 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
eggdropbotscript="eggdrop Kantuta.conf" << ruta donde pegaste el
Kantu.botchkbotname="Kantuta" << nombre del tu bot, ese dato esta en tu
.confuserfile="Kantuta.user" << este dato los sacas de tu
.confpidfile="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.botchken nuestro programa segure shells ejecutamos los siguientes comandos:
cd /home/sedinne/kantutay 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>&1ahi nos dice que la tarea verificara cada 10 minutos si esta activa o no
para salir del editor damos los comandos control +oluego enter y damos el comandos
control +xcon 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 -lpara eliminar todas las tareas que tengamos en general
crontab -r################ fin del tutorial contrab para eggdrop ################Edited by Sedition - 5/7/2020, 22:26