guard clause to run bootstrap as root

This commit is contained in:
Brendan McDevitt 2022-02-11 20:11:24 -06:00
parent 89523a57f2
commit 9fb650f731
2 changed files with 6 additions and 1 deletions

View file

@ -7,7 +7,7 @@ Create a text file with one ip address per line and place it in the `./proxy_cen
### Step 2: ### Step 2:
Run bootstrap.sh Run bootstrap.sh
`./bootstrap.sh` `bash bootstrap.sh`
This will do the following: This will do the following:
- Install squid proxy - Install squid proxy
- Create a new ifcfg-eth0:{index} for every ip address in ./ips.txt - Create a new ifcfg-eth0:{index} for every ip address in ./ips.txt

View file

@ -4,6 +4,11 @@
# 2. install a squid proxy with basic auth username/pass # 2. install a squid proxy with basic auth username/pass
# 3. append ip addresses as listeners for each ip added. # 3. append ip addresses as listeners for each ip added.
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
# step 1: install squid # step 1: install squid
sh install_squid.sh sh install_squid.sh