1
0
mirror of https://github.com/AAAAAEXQOSyIpN2JZ0ehUQ/SSHPLUS-MANAGER-FREE.git synced 2024-11-27 06:09:04 +00:00
SSHPLUS-MANAGER-FREE/Modulos/instsqd
AAAAAEXQOSyIpN2JZ0ehUQ 29999a373a Update Script
2021-03-19 03:33:57 -03:00

38 lines
1.4 KiB
Bash

#!/bin/bash
clear
op=$1
[[ ! -d /usr/share/.plus ]] && exit 0
fun_sqd01() {
[[ -e /etc/apt/sources.list.d/trusty_sources.list ]] && {
rm /etc/apt/sources.list.d/trusty_sources.list >/dev/null 2>&1
[[ $(grep -wc 'Debian' /etc/issue.net) != '0' ]] && {
apt-key del 3B4FE6ACC0B21F32 >/dev/null 2>&1
}
apt remove squid3=3.3.8-1ubuntu6 squid=3.3.8-1ubuntu6 squid3-common=3.3.8-1ubuntu6 -y >/dev/null 2>&1
apt update -y >/dev/null 2>&1
apt autoremove -y >/dev/null 2>&1
}
apt install squid3 -y >/dev/null 2>&1
}
fun_sqd02() {
[[ ! -e /etc/apt/sources.list.d/trusty_sources.list ]] && {
touch /etc/apt/sources.list.d/trusty_sources.list >/dev/null 2>&1
echo "deb http://us.archive.ubuntu.com/ubuntu/ trusty main universe" | tee --append /etc/apt/sources.list.d/trusty_sources.list >/dev/null 2>&1
}
[[ $(grep -wc 'Debian' /etc/issue.net) != '0' ]] && {
apt install dirmngr -y >/dev/null 2>&1
[[ $(apt-key list 2>/dev/null | grep -c 'Ubuntu') == '0' ]] && {
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32 >/dev/null 2>&1
}
}
apt update -y >/dev/null 2>&1
apt install squid3=3.3.8-1ubuntu6 squid=3.3.8-1ubuntu6 squid3-common=3.3.8-1ubuntu6 -y >/dev/null 2>&1
wget -qO- https://raw.githubusercontent.com/CRAZY-VPN/SQUID3/master/squid3 >/etc/init.d/squid3
chmod +x /etc/init.d/squid3 >/dev/null 2>&1
update-rc.d squid3 defaults >/dev/null 2>&1
}
[[ $op == '1' ]] && {
fun_sqd02
} || {
fun_sqd01
}