@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
|
#!/bin/bash
|
||||||
flech='=>'
|
flech='=>'
|
||||||
|
#==>> funciones generales.
|
||||||
menu_func(){
|
menu_func(){
|
||||||
local options=${#@}
|
local options=${#@}
|
||||||
local array
|
local array
|
||||||
@ -79,7 +80,7 @@ enter(){
|
|||||||
# opcion, regresar volver/atras
|
# opcion, regresar volver/atras
|
||||||
back(){
|
back(){
|
||||||
msg -b
|
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
|
msg -b
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -218,6 +219,7 @@ export -f enter
|
|||||||
export -f back
|
export -f back
|
||||||
export -f print_center
|
export -f print_center
|
||||||
export -f del printext mportas
|
export -f del printext mportas
|
||||||
|
#==>> instalador
|
||||||
unset -v sdir
|
unset -v sdir
|
||||||
sdir[0]='/etc/adm-db'
|
sdir[0]='/etc/adm-db'
|
||||||
sdir[1]='/usr/local/lib/exec-dk'
|
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
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
download(){
|
download(){
|
||||||
|
local urL='https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main'
|
||||||
case $1 in
|
case $1 in
|
||||||
-s | --script)
|
-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")
|
#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 --script
|
||||||
download --botgen
|
download --botgen
|
||||||
elif [[ $1 == @('-m'|'--menu') ]]; then
|
elif [[ $1 == @('-m'|'--menu') ]]; then
|
||||||
|
#==>>> menú botgen
|
||||||
clear&&clear
|
clear&&clear
|
||||||
figlet 'BOTGEN'|lolcat
|
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"
|
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
|
msg -b
|
||||||
unset pb pB ph pH
|
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;31m[OFF]"&&pB="\e[1;32mACTIVAR/INICIAR BOTGEN"
|
||||||
} || { pb="\e[1;32m[ON] "&&pB="\e[1;31mAPAGAR 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;31m[OFF]"&&pH="\e[1;32mACTIVAR/INICIAR GEN/SERVER"
|
||||||
} || { ph="\e[1;32m[ON] "&&pH="\e[1;31mDESACTIVAR GEN/SERVER" ; }
|
} || { ph="\e[1;32m[ON] "&&pH="\e[1;31mDESACTIVAR GEN/SERVER" ; }
|
||||||
for i in `seq 0 2`; do
|
for i in `seq 0 2`; do
|
||||||
@ -459,7 +463,7 @@ elif [[ $1 == @('-m'|'--menu') ]]; then
|
|||||||
case $(selection_fun 2) in
|
case $(selection_fun 2) in
|
||||||
0) ./$0 --menu;;
|
0) ./$0 --menu;;
|
||||||
1)packages -i&&download --botgen;;
|
1)packages -i&&download --botgen;;
|
||||||
2)packages -i&&download --scripts;;
|
2)packages -i&&download --script;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
3)
|
3)
|
||||||
@ -474,27 +478,28 @@ elif [[ $1 == @('-m'|'--menu') ]]; then
|
|||||||
lnk="https://api.telegram.org/bot$token/sendMessage"
|
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
|
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 [+]"
|
echo -e "\e[1;32m[+] mensaje enviado exitosamente [+]"
|
||||||
enter&&./$0 --menu
|
$0 --menu
|
||||||
;;
|
;;
|
||||||
6)
|
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'
|
msg -r 'BOTGEN APAGADO CORRECTAMENTE'
|
||||||
systemctl stop BotGen >/dev/null
|
eval $(systemctl stop BotGen)
|
||||||
else
|
else
|
||||||
msg -v "BOTGEN ACTIVADO CORRECTAMENTE"
|
msg -v "BOTGEN ACTIVADO CORRECTAMENTE"
|
||||||
systemctl start BotGen >/dev/null 2>&1
|
eval $(systemctl start BotGen)
|
||||||
fi
|
fi
|
||||||
enter&&./$0 --menu
|
enter&&./$0 --menu
|
||||||
;;
|
;;
|
||||||
7)
|
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'
|
msg -r 'GENERADOR APAGADO CORRECTAMENTE'
|
||||||
systemctl stop http-server >/dev/null
|
systemctl stop http-server
|
||||||
else
|
else
|
||||||
msg -v "GENERADOR ACTIVADO CORRECTAMENTE"
|
msg -v "GENERADOR ACTIVADO CORRECTAMENTE"
|
||||||
systemctl start http-server >/dev/null 2>&1
|
systemctl start http-server
|
||||||
fi
|
fi
|
||||||
enter&&./$0 -m
|
enter
|
||||||
|
$0 --menu
|
||||||
;;
|
;;
|
||||||
*);;
|
*);;
|
||||||
esac
|
esac
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user