From be6b1e66a1ca454b61a4732eafc3296df9ac7a14 Mon Sep 17 00:00:00 2001 From: dinger1986 Date: Mon, 11 Sep 2023 10:16:45 +0100 Subject: [PATCH 1/3] Update install.sh --- install.sh | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 59efced..4cca859 100644 --- a/install.sh +++ b/install.sh @@ -241,8 +241,27 @@ if ! [[ $wanip =~ ^[a-zA-Z0-9]+([a-zA-Z0-9.-]*[a-zA-Z0-9]+)?$ ]]; then echo -e "${RED}Invalid domain/DNS address${NC}" exit 1 fi -sudo apt -y install nginx -sudo apt -y install python3-certbot-nginx + +echo "Installing nginx" +if [ "${ID}" = "debian" ] || [ "$OS" = "Ubuntu" ] || [ "$OS" = "Debian" ] || [ "${UPSTREAM_ID}" = "ubuntu" ] || [ "${UPSTREAM_ID}" = "debian" ]; then + sudo apt -y install nginx + sudo apt -y install python3-certbot-nginx +elif [ "$OS" = "CentOS" ] || [ "$OS" = "RedHat" ] || [ "${UPSTREAM_ID}" = "rhel" ] || [ "${OS}" = "Almalinux" ] || [ "${UPSTREAM_ID}" = "Rocky*" ] ; then +# openSUSE 15.4 fails to run the relay service and hangs waiting for it +# Needs more work before it can be enabled +# || [ "${UPSTREAM_ID}" = "suse" ] + sudo yum -y install nginx + sudo yum -y install python3-certbot-nginx +elif [ "${ID}" = "arch" ] || [ "${UPSTREAM_ID}" = "arch" ]; then + sudo pacman -S install nginx + sudo pacman -S install python3-certbot-nginx +else + echo "Unsupported OS" + # Here you could ask the user for permission to try and install anyway + # If they say yes, then do the install + # If they say no, exit the script + exit 1 +fi rustdesknginx="$( cat < Date: Mon, 11 Sep 2023 10:17:10 +0100 Subject: [PATCH 2/3] Update convertfromos.sh --- convertfromos.sh | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/convertfromos.sh b/convertfromos.sh index 9a237a0..ef474bf 100644 --- a/convertfromos.sh +++ b/convertfromos.sh @@ -257,8 +257,27 @@ if ! [[ $wanip =~ ^[a-zA-Z0-9]+([a-zA-Z0-9.-]*[a-zA-Z0-9]+)?$ ]]; then echo -e "${RED}Invalid domain/DNS address${NC}" exit 1 fi -sudo apt -y install nginx -sudo apt -y install python3-certbot-nginx + +echo "Installing nginx" +if [ "${ID}" = "debian" ] || [ "$OS" = "Ubuntu" ] || [ "$OS" = "Debian" ] || [ "${UPSTREAM_ID}" = "ubuntu" ] || [ "${UPSTREAM_ID}" = "debian" ]; then + sudo apt -y install nginx + sudo apt -y install python3-certbot-nginx +elif [ "$OS" = "CentOS" ] || [ "$OS" = "RedHat" ] || [ "${UPSTREAM_ID}" = "rhel" ] || [ "${OS}" = "Almalinux" ] || [ "${UPSTREAM_ID}" = "Rocky*" ] ; then +# openSUSE 15.4 fails to run the relay service and hangs waiting for it +# Needs more work before it can be enabled +# || [ "${UPSTREAM_ID}" = "suse" ] + sudo yum -y install nginx + sudo yum -y install python3-certbot-nginx +elif [ "${ID}" = "arch" ] || [ "${UPSTREAM_ID}" = "arch" ]; then + sudo pacman -S install nginx + sudo pacman -S install python3-certbot-nginx +else + echo "Unsupported OS" + # Here you could ask the user for permission to try and install anyway + # If they say yes, then do the install + # If they say no, exit the script + exit 1 +fi rustdesknginx="$( cat < Date: Mon, 11 Sep 2023 10:17:40 +0100 Subject: [PATCH 3/3] Update restore.sh --- restore.sh | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/restore.sh b/restore.sh index 098dea1..6296fdc 100644 --- a/restore.sh +++ b/restore.sh @@ -238,8 +238,27 @@ if ! [[ $wanip =~ ^[a-zA-Z0-9]+([a-zA-Z0-9.-]*[a-zA-Z0-9]+)?$ ]]; then echo -e "${RED}Invalid domain/DNS address${NC}" exit 1 fi -sudo apt -y install nginx -sudo apt -y install python3-certbot-nginx + +echo "Installing nginx" +if [ "${ID}" = "debian" ] || [ "$OS" = "Ubuntu" ] || [ "$OS" = "Debian" ] || [ "${UPSTREAM_ID}" = "ubuntu" ] || [ "${UPSTREAM_ID}" = "debian" ]; then + sudo apt -y install nginx + sudo apt -y install python3-certbot-nginx +elif [ "$OS" = "CentOS" ] || [ "$OS" = "RedHat" ] || [ "${UPSTREAM_ID}" = "rhel" ] || [ "${OS}" = "Almalinux" ] || [ "${UPSTREAM_ID}" = "Rocky*" ] ; then +# openSUSE 15.4 fails to run the relay service and hangs waiting for it +# Needs more work before it can be enabled +# || [ "${UPSTREAM_ID}" = "suse" ] + sudo yum -y install nginx + sudo yum -y install python3-certbot-nginx +elif [ "${ID}" = "arch" ] || [ "${UPSTREAM_ID}" = "arch" ]; then + sudo pacman -S install nginx + sudo pacman -S install python3-certbot-nginx +else + echo "Unsupported OS" + # Here you could ask the user for permission to try and install anyway + # If they say yes, then do the install + # If they say no, exit the script + exit 1 +fi rustdesknginx="$( cat <