mirror of
https://github.com/serverok/squid-proxy-installer.git
synced 2026-04-02 10:38:52 +00:00
added debian 12 support
This commit is contained in:
@@ -5,7 +5,7 @@ https://serverok.in/squid
|
||||
Auto install Squid 3 proxy on following linux OS.
|
||||
|
||||
* Ubuntu 14.04, 16.04, 18.04, 20.04, 22.04
|
||||
* Debian 8, 9, 10, 11
|
||||
* Debian 8, 9, 10, 11, 12
|
||||
* CentOS 7, 8
|
||||
* AlmaLinux 8, 9
|
||||
|
||||
|
||||
@@ -28,6 +28,8 @@ elif cat /etc/os-release | grep PRETTY_NAME | grep "buster" > /dev/null; then
|
||||
echo "debian10"
|
||||
elif cat /etc/os-release | grep PRETTY_NAME | grep "bullseye" > /dev/null; then
|
||||
echo "debian11"
|
||||
elif cat /etc/os-release | grep PRETTY_NAME | grep "bookworm" > /dev/null; then
|
||||
echo "debian12"
|
||||
elif cat /etc/os-release | grep PRETTY_NAME | grep "CentOS Linux 7" > /dev/null; then
|
||||
echo "centos7"
|
||||
elif cat /etc/os-release | grep PRETTY_NAME | grep "CentOS Linux 8" > /dev/null; then
|
||||
|
||||
@@ -57,7 +57,7 @@ elif [ $SOK_OS == "debian9" ]; then
|
||||
systemctl reload squid
|
||||
elif [ $SOK_OS == "debian10" ]; then
|
||||
systemctl reload squid
|
||||
elif [ $SOK_OS == "debian11" ]; then
|
||||
elif [ "$SOK_OS" == "debian11" ] && "$SOK_OS" == "debian12" ]; then
|
||||
systemctl reload squid
|
||||
elif [ $SOK_OS == "centos7" ]; then
|
||||
systemctl reload squid
|
||||
|
||||
@@ -158,6 +158,21 @@ elif [ $SOK_OS == "debian11" ]; then
|
||||
fi
|
||||
systemctl enable squid
|
||||
systemctl restart squid
|
||||
elif [ $SOK_OS == "debian12" ]; then
|
||||
# OS = Debian GNU/Linux 12 (bookworm)
|
||||
/bin/rm -rf /etc/squid
|
||||
/usr/bin/apt update
|
||||
/usr/bin/apt -y install apache2-utils squid
|
||||
touch /etc/squid/passwd
|
||||
/bin/rm -f /etc/squid/squid.conf
|
||||
/usr/bin/touch /etc/squid/blacklist.acl
|
||||
/usr/bin/wget --no-check-certificate -O /etc/squid/squid.conf https://raw.githubusercontent.com/serverok/squid-proxy-installer/master/squid.conf
|
||||
if [ -f /sbin/iptables ]; then
|
||||
/sbin/iptables -I INPUT -p tcp --dport 3128 -j ACCEPT
|
||||
/sbin/iptables-save
|
||||
fi
|
||||
systemctl enable squid
|
||||
systemctl restart squid
|
||||
elif [ $SOK_OS == "centos7" ]; then
|
||||
yum install squid httpd-tools -y
|
||||
/bin/rm -f /etc/squid/squid.conf
|
||||
|
||||
Reference in New Issue
Block a user