Skip to content

Commit

Permalink
added almalinux 8/9 support
Browse files Browse the repository at this point in the history
  • Loading branch information
serverok committed Jul 15, 2023
1 parent 4202397 commit 1c2059f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 5 additions & 1 deletion sok-find-os.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ elif cat /etc/os-release | grep PRETTY_NAME | grep "CentOS Linux 7" > /dev/null;
echo "centos7"
elif cat /etc/os-release | grep PRETTY_NAME | grep "CentOS Linux 8" > /dev/null; then
echo "centos8"
elif cat /etc/os-release | grep PRETTY_NAME | grep "AlmaLinux 8" > /dev/null; then
echo "almalinux8"
elif cat /etc/os-release | grep PRETTY_NAME | grep "AlmaLinux 8" > /dev/null; then
echo "almalinux9"
else
echo "OS NOT SUPPORTED"
echo "ERROR"
fi
8 changes: 7 additions & 1 deletion squid3-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ fi

SOK_OS=$(/usr/local/bin/sok-find-os)

if [ $SOK_OS == "ERROR" ]; then
echo "OS NOT SUPPORTED.\n"
echo "Contact https://serverok.in/contact to add support for your OS."
exit 1;
fi

if [ $SOK_OS == "ubuntu2204" ]; then
/usr/bin/apt update
/usr/bin/apt -y install apache2-utils squid
Expand Down Expand Up @@ -161,7 +167,7 @@ elif [ $SOK_OS == "centos7" ]; then
systemctl restart squid
firewall-cmd --zone=public --permanent --add-port=3128/tcp
firewall-cmd --reload
elif [ $SOK_OS == "centos8" ]; then
elif [ $SOK_OS == "centos8" ] || [ $SOK_OS == "almalinux8"] || [ $SOK_OS == "almalinux9"]; then
yum install squid httpd-tools -y
/bin/rm -f /etc/squid/squid.conf
/usr/bin/touch /etc/squid/blacklist.acl
Expand Down

0 comments on commit 1c2059f

Please sign in to comment.