Script updated
This commit is contained in:
parent
5617fe206d
commit
a8addbec49
1 changed files with 5 additions and 3 deletions
|
|
@ -29,10 +29,10 @@ else
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
read -p " Do you wish to install via APT? (Y/n) : " install
|
read -p " Do you wish to install via APT? (Y/n) : " install
|
||||||
|
echo ""
|
||||||
if [[ "$install" = "" || "$install" = "y" || "$install" = "Y" ]]; then
|
if [[ "$install" = "" || "$install" = "y" || "$install" = "Y" ]]; then
|
||||||
sudo apt update && sudo apt install --install-suggests -y $pkgs --simulate ## DEV
|
sudo apt update && sudo apt install --install-suggests -y $pkgs --simulate ## DEV
|
||||||
echo -e "\n${GRN}Dependencies installed. Proceeding...${CRS}\n"
|
echo -e "\n${GRN} Dependencies installed. Proceeding...${CRS}\n"
|
||||||
break
|
break
|
||||||
|
|
||||||
elif [[ "$install" == "n" || "$install" = "N" ]]; then
|
elif [[ "$install" == "n" || "$install" = "N" ]]; then
|
||||||
|
|
@ -53,14 +53,16 @@ while true; do
|
||||||
read -p " Enable SSL and create self signed cetrificate? (Y/n) : " installSSL
|
read -p " Enable SSL and create self signed cetrificate? (Y/n) : " installSSL
|
||||||
if [[ "$installSSL" = "" || "$installSSL" = "y" || "$installSSL" = "Y" ]]; then
|
if [[ "$installSSL" = "" || "$installSSL" = "y" || "$installSSL" = "Y" ]]; then
|
||||||
read -p " Enter path to certificates folder (Will be created if not present) : " cert_path
|
read -p " Enter path to certificates folder (Will be created if not present) : " cert_path
|
||||||
|
echo ""
|
||||||
read -p " Enter file name for certificates (Without file ending) : " cert_name
|
read -p " Enter file name for certificates (Without file ending) : " cert_name
|
||||||
|
echo ""
|
||||||
sudo mkdir -p "$cert_path"
|
sudo mkdir -p "$cert_path"
|
||||||
echo "Folder created" ## DEV
|
|
||||||
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout "$cert_path"/"$cert_name".key -out "$cert_path"/"$cert_name".crt
|
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout "$cert_path"/"$cert_name".key -out "$cert_path"/"$cert_name".crt
|
||||||
echo -e "\n${GRN} Nginx configured${CRS}\n"
|
echo -e "\n${GRN} Nginx configured${CRS}\n"
|
||||||
break
|
break
|
||||||
elif [[ "$installSSL" == "n" || "$installSSL" = "N" ]]; then
|
elif [[ "$installSSL" == "n" || "$installSSL" = "N" ]]; then
|
||||||
echo -e "\n${RED} No SSL in nginx configured${CRS}\n"
|
echo -e "\n${RED} No SSL in nginx configured${CRS}\n"
|
||||||
|
break
|
||||||
else
|
else
|
||||||
echo -e "\n${YEL} Invalid response... Try again...\n\nY = (Yes, configure SSL certificate and continue)\nN = (No, don't configure SSL certificate and continue)${CRS}\n "
|
echo -e "\n${YEL} Invalid response... Try again...\n\nY = (Yes, configure SSL certificate and continue)\nN = (No, don't configure SSL certificate and continue)${CRS}\n "
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue