Created
April 20, 2020 14:26
-
-
Save dominusLabs/68799336514ed41c95c1447d94fcb0a4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
FILE_NAME=`date | tr ' ' '_' | tr ':' '_'` | |
export DEBIAN_FRONTEND=noninteractive >> /var/${FILE_NAME} 2>&1 | |
apt update -y && apt upgrade -y >> /var/${FILE_NAME} 2>&1 | |
hostnamectl set-hostname domnag >> /var/${FILE_NAME} 2>&1 | |
sudo apt install squid -y >> /var/${FILE_NAME} 2>&1 | |
sudo apt install squid-common -y >> /var/${FILE_NAME} 2>&1 | |
sudo apt install apache2-utils -y >> /var/${FILE_NAME} 2>&1 | |
curl -o squid.conf https://raw.githubusercontent.com/mechaadi/squidconf/master/squid.conf >> /var/${FILE_NAME} 2>&1 | |
sudo cp squid.conf /etc/squid >> /var/${FILE_NAME} 2>&1 | |
htpasswd -b -c /etc/squid/squidusers proxy_username_goes_here proxy_password_goes_here >> /var/${FILE_NAME} 2>&1 | |
sudo service squid restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment