From 2494e9d278a3552063cc5c24b5f8b9b38cc4da34 Mon Sep 17 00:00:00 2001 From: Fr4nzD13trich Date: Sat, 11 Oct 2025 17:36:02 +0200 Subject: [PATCH] Code Cleanup --- dev_env_setup.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/dev_env_setup.sh b/dev_env_setup.sh index c1be918..e0a6842 100755 --- a/dev_env_setup.sh +++ b/dev_env_setup.sh @@ -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}"