mirror of
https://github.com/AAAAAEXQOSyIpN2JZ0ehUQ/SSHPLUS-MANAGER-FREE.git
synced 2024-11-27 14:19:03 +00:00
137 lines
4.8 KiB
Bash
137 lines
4.8 KiB
Bash
#!/bin/bash
|
|
clear
|
|
fun_bar () {
|
|
comando[0]="$1"
|
|
comando[1]="$2"
|
|
(
|
|
[[ -e $HOME/fim ]] && rm $HOME/fim
|
|
${comando[0]} -y > /dev/null 2>&1
|
|
${comando[1]} -y > /dev/null 2>&1
|
|
touch $HOME/fim
|
|
) > /dev/null 2>&1 &
|
|
tput civis
|
|
echo -ne " \033[1;33mAGUARDE \033[1;37m- \033[1;33m["
|
|
while true; do
|
|
for((i=0; i<18; i++)); do
|
|
echo -ne "\033[1;31m#"
|
|
sleep 0.1s
|
|
done
|
|
[[ -e $HOME/fim ]] && rm $HOME/fim && break
|
|
echo -e "\033[1;33m]"
|
|
sleep 1s
|
|
tput cuu1
|
|
tput dl1
|
|
echo -ne " \033[1;33mAGUARDE \033[1;37m- \033[1;33m["
|
|
done
|
|
echo -e "\033[1;33m]\033[1;37m -\033[1;32m OK !\033[1;37m"
|
|
tput cnorm
|
|
}
|
|
echo ""
|
|
echo -e " \033[1;33m● \033[1;32m PREPARANDO O VPS, PODE DEMORAR \033[1;33m●\033[0m"
|
|
fun_preparando () {
|
|
apt-get update -y > /dev/null 2>&1
|
|
apt-get install figlet -y > /dev/null 2>&1
|
|
}
|
|
fun_bar 'fun_preparando'
|
|
clear
|
|
echo ""
|
|
#
|
|
rm /root/atu-v23-p-v25 > /dev/null 2>&1
|
|
mkdir bkp
|
|
cd /var/www/html/pages/system/
|
|
cp pass.php /root/bkp/
|
|
cd
|
|
echo -ne "\033[1;33m●\033[1;32m DESEJA CONTINUAR\033[1;31m\033[1;32m\033[1;33m? \033[1;33m● \033[1;31m[s/n]: ";read resp
|
|
echo ""
|
|
clear
|
|
if [[ "$resp" = @(s|S) ]]; then
|
|
cd /var/www/html/
|
|
rm -rf admin index.php mult.php sair.php app-assets lib new.php scripts assets logando-ori.php new_afiliado.php src enviaremails.php logando.php pages teste.php favicon.ico login-ori.php phpmailer validacao-ori.php home.php login.php validacao.php index-ori.php login2.png recuperando.php index.jpg logo11.png recuperandoclasse.php > /dev/null 2>&1
|
|
cd
|
|
rm /root/PAINEL-V.25.zip > /dev/null 2>&1
|
|
rm $HOME/PAINEL-V.25.zip > /dev/null 2>&1
|
|
IP=$(wget -qO- ipv4.icanhazip.com)
|
|
echo "America/Sao_Paulo" > /etc/timezone
|
|
ln -fs /usr/share/zoneinfo/America/Sao_Paulo /etc/localtime > /dev/null 2>&1
|
|
dpkg-reconfigure --frontend noninteractive tzdata > /dev/null 2>&1
|
|
rm $HOME/atu-v23-p-v25 > /dev/null 2>&1
|
|
#
|
|
clear
|
|
echo -e "\E[44;1;37m ATUALIZAR O PAINEL V.23 PARA V.25 VIP-VPS \E[0m"
|
|
echo ""
|
|
echo -e " \033[1;31mBy @adeilsonfi\033[1;36m"
|
|
echo -e " VIP-vps" | figlet
|
|
echo -e " \033[1;31mPainel-SSH V.25\033[1;36m"
|
|
echo ""
|
|
|
|
echo -e "\n\033[1;36m INICIANDO ATUALIZACAO PODE DEMORAR\033[1;33m"
|
|
cd /var/www/html/
|
|
fun_atualizando () {
|
|
wget http://www.painelweb.tk/PAINEL-V.25.zip > /dev/null 2>&1
|
|
sleep 1
|
|
unzip PAINEL-V.25.zip > /dev/null 2>&1
|
|
rm -rf PAINEL-V.25.zip index.html > /dev/null 2>&1
|
|
service apache2 restart
|
|
}
|
|
fun_bar 'fun_atualizando'
|
|
sleep 1
|
|
cd
|
|
rm /var/www/html/pages/system/pass.php
|
|
cd /root/bkp
|
|
cp pass.php /var/www/html/pages/system/
|
|
cd
|
|
rm -r bkp
|
|
#
|
|
echo -e "\n\033[1;36m FINALIZANDO ATUALIZACAO\033[1;33m"
|
|
fun_finalizando () {
|
|
service apache2 restart
|
|
clear
|
|
echo '* * * * * root /usr/bin/php /var/www/html/pages/system/cron.php' >> /etc/crontab
|
|
echo '* * * * * root /usr/bin/php /var/www/html/pages/system/cron.ssh.php ' >> /etc/crontab
|
|
echo '* * * * * root /usr/bin/php /var/www/html/pages/system/cron.sms.php' >> /etc/crontab
|
|
echo '* * * * * root /usr/bin/php /var/www/html/pages/system/cron.online.ssh.php' >> /etc/crontab
|
|
echo '10 * * * * root /usr/bin/php /var/www/html/pages/system/cron.servidor.php' >> /etc/crontab
|
|
# LIMPEZA HISTORICO USUARIOS ONLINE A CADA 1 MINUTO #
|
|
echo '*/1 * * * * root /usr/bin/php /var/www/html/pages/system/cron.limpeza.php' >> /etc/crontab
|
|
# BACKUP BANCO DE DADOS DATABASE SQL A CADA 2 MINUTOS #
|
|
echo '*/2 * * * * root /bin/autobackup.sh' >> /etc/crontab
|
|
/etc/init.d/cron reload > /dev/null 2>&1
|
|
/etc/init.d/cron restart > /dev/null 2>&1
|
|
cd /bin
|
|
rm autobackup.sh > /dev/null 2>&1
|
|
wget http://www.painelweb.tk/autobackup.sh > /dev/null 2>&1 && chmod 777 autobackup.sh && sed -i -e 's/\r$//' autobackup.sh && ./autobackup.sh
|
|
# echo '0 */12 * * * root cd /var/www/html/pages/system/ && bash cron.backup.sh && cd /root' >> /etc/crontab
|
|
# echo '5 */12 * * * root cd /var/www/html/pages/system/ && /usr/bin/php cron.backup.php && cd /root' >> /etc/crontab
|
|
/etc/init.d/cron reload > /dev/null 2>&1
|
|
/etc/init.d/cron restart > /dev/null 2>&1
|
|
chmod 777 /var/www/html/admin/pages/apis/banco19157
|
|
chmod 777 /var/www/html/admin/pages/servidor/ovpn
|
|
chmod 777 /var/www/html/admin/pages/download
|
|
chmod 777 /var/www/html/admin/pages/faturas/comprovantes
|
|
service apache2 restart
|
|
sleep 1
|
|
service apache2 restart
|
|
}
|
|
fun_bar 'fun_finalizando'
|
|
clear
|
|
echo ""
|
|
#
|
|
clear
|
|
IP=$(wget -qO- ipv4.icanhazip.com)
|
|
clear
|
|
echo -e "\E[44;1;37m ATUALIZACAO FINALIZADA VIP-VPS \E[0m"
|
|
echo -e " Painel-SSH " | figlet
|
|
echo -e " V.25" | figlet
|
|
echo -e " \033[1;31mBy @adeilsonfi\033[1;36m"
|
|
echo ""
|
|
echo -e "\033[1;36m SEU PAINEL:\033[1;37m http://$IP/\033[0m"
|
|
echo -e "\033[1;36m USUARIO E SENHA:\033[1;37m msm do painel V.23\033[0m"
|
|
echo ""
|
|
sed -i "s;upload_max_filesize = 2M;upload_max_filesize = 20M;g" /etc/php5/apache2/php.ini > /dev/null 2>&1
|
|
service apache2 restart
|
|
echo ""
|
|
fi
|
|
cat /dev/null > ~/.bash_history && history -c
|
|
rm /root/atu-v23-p-v25 > /dev/null 2>&1
|
|
rm /root/PAINEL-V.25.zip > /dev/null 2>&1
|