2025-05-30 06:21:54 -06:00

45 lines
1.2 KiB
Bash

#!/bin/bash
start_gen () {
MSG_id=$((${message_message_id} + 1 ))
unset PIDGEN
PIDGEN=$(ps aux|grep -v grep|grep "http-server.sh")
if [[ ! $PIDGEN ]]; then
screen -dmS generador /bin/http-server.sh -start
local bot_retorno=" ✉️ ====NOTIFICACION==== ✉️ \n"
bot_retorno+="$LINE\n"
bot_retorno+=" Generador: <u>Online</u> ✅\n"
bot_retorno+="$LINE\n"
msj_fun
else
killall http-server.sh
local bot_retorno=" ✉️ ====NOTIFICACION==== ✉️ \n"
bot_retorno+="$LINE\n"
bot_retorno+=" Generador: ⚠️ <u>Offline</u> ❌\n"
bot_retorno+="$LINE\n"
msj_fun
fi
sleep 5s
msj_del ${message_message_id}
msj_del ${MSG_id}
}
files_script() {
MSG_id=$((${message_message_id} + 1 ))
#echo '#!/bin/bash
local bot_retorno=" ✉️ ====NOTIFICACION==== ✉️ \n"
bot_retorno+="$LINE\n"
wget -q -O $HOME/lista https://www.dropbox.com/s/yqhjmr7o3342viv/lista?dl=0 -o /dev/null
rm -f /etc/SCRIPT/*
cd /etc/SCRIPT
wget --no-check-certificate -i $HOME/lista -o || echo " error!"
rm -f $HOME/lista*
cd $HOME
[[ $(ls /etc/SCRIPT/ | wc -l) > 0 ]] && bot_retorno+=" Generador: ⚠️ <u> ACTUALIZADO</u> \n" || bot_retorno+=" ERROR AL ACTUALIZAR, INGRESE AL SERVIDOR\n"
bot_retorno+="$LINE\n"
msj_fun
sleep 5s
msj_del ${message_message_id}
msj_del ${MSG_id}
}