Code Cleanup
This commit is contained in:
parent
1bdb59d012
commit
2494e9d278
1 changed files with 6 additions and 7 deletions
|
|
@ -9,7 +9,7 @@ echo -e "\n ${LCY}Dependency and Privilege Check running...${CRS}\n"
|
|||
|
||||
### PRIVILEGES
|
||||
|
||||
if (( $(id -u) == 0 )); then ### AM I ROOT?
|
||||
if (( $(id -u) == 0 )); then ### AM I ROOT ?
|
||||
echo -e " ${GRN}Privilege check passed...${CRS}\n"
|
||||
|
||||
else
|
||||
|
|
@ -20,7 +20,7 @@ fi
|
|||
|
||||
### DEPENDENCIES
|
||||
|
||||
dep_check() {
|
||||
dep_check() { ### MISSING PKGS ?
|
||||
local pkg="$1"
|
||||
|
||||
if dpkg -s "$pkg" >/dev/null 2>&1; then
|
||||
|
|
@ -40,7 +40,7 @@ missing="$(cat /tmp/missing_dev 2>/dev/null)"
|
|||
if ! [ "$missing" ]; then
|
||||
echo -e "\n ${GRN}Dependencies met. Proceeding...${CRS}\n"
|
||||
|
||||
else
|
||||
else ### INSTALLING PKGS
|
||||
echo -e "\n ${RED}Following dependencies are missing :${CRS}\n\n$missing"
|
||||
|
||||
while true; do
|
||||
|
|
@ -89,7 +89,7 @@ while true; do
|
|||
fi
|
||||
done
|
||||
|
||||
ip4=$(/sbin/ip -o -4 addr list "$nif" | awk '{print $4}' | cut -d/ -f1) ### GET IP FOR CHOSEN INTERFACE ########## HOSTNAME TROUBLE! fix it
|
||||
ip4=$(/sbin/ip -o -4 addr list "$nif" | awk '{print $4}' | cut -d/ -f1) ### GET IP FOR CHOSEN INTERFACE
|
||||
echo -e "\n ${YEL}Current hostname : ${LCY}$(hostname)${CRS}"
|
||||
echo -e " ${YEL}Current ip address : ${LCY}$ip4 ${YEL}@ ${LCY}$nif${CRS}"
|
||||
echo -e "\n ${YEL}This information will be used to configure ${LCY}nginx.conf ${YEL}during the next steps.${CRS}"
|
||||
|
|
@ -179,9 +179,10 @@ sudo nginx -s reload
|
|||
|
||||
|
||||
|
||||
|
||||
### DEV STATUS
|
||||
|
||||
echo -e "\n ${LGN}Script ran through...${CRS}"
|
||||
|
||||
###### JEFF ######
|
||||
#
|
||||
# test nginx config
|
||||
|
|
@ -189,5 +190,3 @@ sudo nginx -s reload
|
|||
#
|
||||
###### JEFF END ######
|
||||
|
||||
|
||||
echo -e "\n ${LGN}Script ran through...${CRS}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue