Code cleanup

This commit is contained in:
Fr4nz D13trich 2025-10-12 09:49:35 +02:00
parent 5a45c280fb
commit 45f990a1b8

View file

@ -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 ### INSTALLING PKGS
else ### INSTALLING PKGS !
echo -e "\n ${RED}Following dependencies are missing :${CRS}\n\n$missing"
while true; do
@ -70,7 +70,7 @@ fi
###### HOST
onif=$(/sbin/ip route get 162.249.72.1 | awk '{print $5}' | cut -d/ -f1) ### GET ACTIVE NETWORK INTERFACE
onif=$(/sbin/ip route get 162.249.72.1 | awk '{print $5}' | cut -d/ -f1) ### GET ACTIVE NETWORK INTERFACE !
while true; do
echo -e " ${YEL}What network interface will nginx be using?${CRS}"
@ -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
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}"
@ -177,7 +177,7 @@ sudo nginx -s reload
###### STATUS
echo -e "\n ${LGN}Mandatory packages have been installed ${LCY}$cert_name.crt ${GRN}and ${LCY}$cert_name.key ${GRN}created and stored in ${LCY}$cert_path${CRS}\n"
echo -e "\n ${LGN}Mandatory packages have been installed\n ${LCY}$cert_name.crt ${LGN}and ${LCY}$cert_name.key ${GRN}created in ${LCY}$cert_path${CRS}\n"
### DEV STATUS
@ -185,8 +185,8 @@ echo -e "\n ${LGN}Mandatory packages have been installed ${LCY}$cert_name.crt
###### JEFF ######
#
# test nginx config
# restart nginx
#
#
#
###### JEFF END ######