@drowkid1
This commit is contained in:
parent
e1d8349ccc
commit
bdbaec0b92
Binary file not shown.
31
init.sh
31
init.sh
@ -1,5 +1,6 @@
|
||||
#!/bin/bash
|
||||
flech='=>'
|
||||
#==>> funciones generales.
|
||||
menu_func(){
|
||||
local options=${#@}
|
||||
local array
|
||||
@ -79,7 +80,7 @@ enter(){
|
||||
# opcion, regresar volver/atras
|
||||
back(){
|
||||
msg -b
|
||||
echo -ne " \033[0;35m [\033[0;36m0\033[0;35m]\033[0;33m ${flech} \e[1;37m\e[41mSALIR\e[0m\n"
|
||||
echo -ne " \033[1;30m [\033[1;36m0\033[1;30m] <<====>> [\e[48;5;99m#\e[1;37mSALIR\e[1;30m]\e[0m\n"
|
||||
msg -b
|
||||
}
|
||||
|
||||
@ -218,6 +219,7 @@ export -f enter
|
||||
export -f back
|
||||
export -f print_center
|
||||
export -f del printext mportas
|
||||
#==>> instalador
|
||||
unset -v sdir
|
||||
sdir[0]='/etc/adm-db'
|
||||
sdir[1]='/usr/local/lib/exec-dk'
|
||||
@ -297,12 +299,13 @@ soft='bc gawk jq screen curl socat netcat netstat netcat-traditional net-tools c
|
||||
}
|
||||
}
|
||||
|
||||
msg -bar&&enter
|
||||
enter
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
download(){
|
||||
local urL='https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main'
|
||||
case $1 in
|
||||
-s | --script)
|
||||
#url=( "https://www.dropbox.com/s/3ujxegx15hoh1w2/SCRIPT-LATAM.zip" "https://www.dropbox.com/s/o3wyvhaxxb5sj8h/SCRIPTMX.zip" "https://raw.githubusercontent.com/kelokepe/scriptcgh/main/Control/chukk.tar")
|
||||
@ -420,15 +423,16 @@ if [[ $1 == @('-i'|'--install') ]]; then
|
||||
download --script
|
||||
download --botgen
|
||||
elif [[ $1 == @('-m'|'--menu') ]]; then
|
||||
#==>>> menú botgen
|
||||
clear&&clear
|
||||
figlet 'BOTGEN'|lolcat
|
||||
echo -ne "\e[1;30m[#\e[1;34mIP: \e[1;36m$(cat /usr/local/lib/exec-dk/ipdk)\e[1;30m] \e[1;30m[#\e[0;34mversion: \e[1;36mv1.1\e[1;30m]\n"
|
||||
msg -b
|
||||
unset pb pB ph pH
|
||||
[[ $(systemctl status BotGen) == 'inactive' ]] && {
|
||||
[[ $(systemctl is-active BotGen|grep -w 'inactive') == 'inactive' ]] && {
|
||||
pb="\e[1;31m[OFF]"&&pB="\e[1;32mACTIVAR/INICIAR BOTGEN"
|
||||
} || { pb="\e[1;32m[ON] "&&pB="\e[1;31mAPAGAR BOTGEN"; }
|
||||
[[ $(systemctl status http-server) == 'inactive' ]] && {
|
||||
[[ $(systemctl is-active http-server|grep -v grep|grep 'inactive') == 'inactive' ]] && {
|
||||
ph="\e[1;31m[OFF]"&&pH="\e[1;32mACTIVAR/INICIAR GEN/SERVER"
|
||||
} || { ph="\e[1;32m[ON] "&&pH="\e[1;31mDESACTIVAR GEN/SERVER" ; }
|
||||
for i in `seq 0 2`; do
|
||||
@ -459,7 +463,7 @@ elif [[ $1 == @('-m'|'--menu') ]]; then
|
||||
case $(selection_fun 2) in
|
||||
0) ./$0 --menu;;
|
||||
1)packages -i&&download --botgen;;
|
||||
2)packages -i&&download --scripts;;
|
||||
2)packages -i&&download --script;;
|
||||
esac
|
||||
;;
|
||||
3)
|
||||
@ -474,27 +478,28 @@ elif [[ $1 == @('-m'|'--menu') ]]; then
|
||||
lnk="https://api.telegram.org/bot$token/sendMessage"
|
||||
curl -s --max-time 10 -d "chat_id=$id&disable_web_page_preview=1&text=$msj" $lnk >/dev/null 2>&1
|
||||
echo -e "\e[1;32m[+] mensaje enviado exitosamente [+]"
|
||||
enter&&./$0 --menu
|
||||
$0 --menu
|
||||
;;
|
||||
6)
|
||||
if systemctl status BotGen|grep -w 'active' >/dev/null 2>&1; then
|
||||
if [[ $(systemctl is-active BotGen) != 'inactive' ]]; then
|
||||
msg -r 'BOTGEN APAGADO CORRECTAMENTE'
|
||||
systemctl stop BotGen >/dev/null
|
||||
eval $(systemctl stop BotGen)
|
||||
else
|
||||
msg -v "BOTGEN ACTIVADO CORRECTAMENTE"
|
||||
systemctl start BotGen >/dev/null 2>&1
|
||||
eval $(systemctl start BotGen)
|
||||
fi
|
||||
enter&&./$0 --menu
|
||||
;;
|
||||
7)
|
||||
if systemctl status http-server|grep -w 'active' >/dev/null 2>&1; then
|
||||
if [[ $(systemctl is-active http-server) == 'active' ]]; then
|
||||
msg -r 'GENERADOR APAGADO CORRECTAMENTE'
|
||||
systemctl stop http-server >/dev/null
|
||||
systemctl stop http-server
|
||||
else
|
||||
msg -v "GENERADOR ACTIVADO CORRECTAMENTE"
|
||||
systemctl start http-server >/dev/null 2>&1
|
||||
systemctl start http-server
|
||||
fi
|
||||
enter&&./$0 -m
|
||||
enter
|
||||
$0 --menu
|
||||
;;
|
||||
*);;
|
||||
esac
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user