From 8e2934533ba5f783180bb794147fc61e2569bcf1 Mon Sep 17 00:00:00 2001 From: Donald Zou Date: Sat, 23 Nov 2024 18:08:14 +0800 Subject: [PATCH] Dropping support plan to OpenBSD --- src/dashboard.py | 4 ++-- src/wgd.sh | 41 ----------------------------------------- 2 files changed, 2 insertions(+), 43 deletions(-) diff --git a/src/dashboard.py b/src/dashboard.py index d057ec5..120d286 100644 --- a/src/dashboard.py +++ b/src/dashboard.py @@ -973,13 +973,13 @@ class WireguardConfiguration: self.getStatus() if self.Status: try: - check = subprocess.call(f"wg-quick down {self.Name}", + check = subprocess.check_output(f"wg-quick down {self.Name}", shell=True, stderr=subprocess.STDOUT) except subprocess.CalledProcessError as exc: return False, str(exc.output.strip().decode("utf-8")) else: try: - check = subprocess.call(f"wg-quick up {self.Name}", shell=True, stderr=subprocess.STDOUT) + check = subprocess.check_output(f"wg-quick up {self.Name}", shell=True, stderr=subprocess.STDOUT) except subprocess.CalledProcessError as exc: return False, str(exc.output.strip().decode("utf-8")) self.getStatus() diff --git a/src/wgd.sh b/src/wgd.sh index a598f93..04c1c8d 100755 --- a/src/wgd.sh +++ b/src/wgd.sh @@ -65,8 +65,6 @@ _determineOS(){ OS=$ID elif [ -f /etc/redhat-release ]; then OS="redhat" - elif [ "$(uname)" = "OpenBSD" ]; then - OS="openbsd" else printf "[WGDashboard] %s Sorry, your OS is not supported. Currently the install script only support Debian-based, Red Hat-based OS. With experimental support for Alpine Linux.\n" "$heavy_crossmark" printf "%s\n" "$helpMsg" @@ -93,19 +91,6 @@ _installPython(){ alpine) { sudo apk update; sudo apk add python3 net-tools --no-cache; printf "\n\n"; } >> ./log/install.txt ;; - openbsd) - if [ "$(uname -r)" = "7.6" ]; then - { pkg_add -v python-3.11.10p0; printf "\n\n"; } >> ./log/install.txt - elif [ "$(uname -r)" = "7.5" ]; then - { pkg_add -v python-3.11.8; printf "\n\n"; } >> ./log/install.txt - elif [ "$(uname -r)" = "7.4" ]; then - { pkg_add -v python-3.11.5; printf "\n\n"; } >> ./log/install.txt - else - printf "[WGDashboard] %s Current OpenBSD version is not supported. Please install Python 3.10+ manually\n" "$heavy_crossmark" - printf "%s\n" "$helpMsg" - kill $TOP_PID - fi - ;; esac if ! python3 --version > /dev/null 2>&1 @@ -135,19 +120,6 @@ _installPythonVenv(){ alpine) { sudo apk update; sudo apk add py3-virtualenv ; printf "\n\n"; } >> ./log/install.txt ;; - openbsd) - if [ "$(uname -r)" = "7.4" ]; then - { pkg_add -v py3-virtualenv-20.24.4; printf "\n\n"; } >> ./log/install.txt - elif [ "$(uname -r)" = "7.5" ]; then - { pkg_add -v py3-virtualenv-20.25.1; printf "\n\n"; } >> ./log/install.txt - elif [ "$(uname -r)" = "7.6" ]; then - { pkg_add -v py3-virtualenv-20.25.3; printf "\n\n"; } >> ./log/install.txt - else - printf "[WGDashboard] %s Current OpenBSD version is not supported. Please install Python 3 Virtual Environment manually\n" "$heavy_crossmark" - printf "%s\n" "$helpMsg" - kill $TOP_PID - fi - ;; *) printf "[WGDashboard] %s Sorry, your OS is not supported. Currently the install script only support Debian-based, Red Hat-based OS. With experimental support for Alpine Linux.\n" "$heavy_crossmark" printf "%s\n" "$helpMsg" @@ -193,19 +165,6 @@ _installPythonPip(){ alpine) { sudo apk update; sudo apk add py3-pip --no-cache; printf "\n\n"; } >> ./log/install.txt ;; - openbsd) - if [ "$(uname -r)" = "7.4" ]; then - { pkg_add -v py3-pip-23.2.1; printf "\n\n"; } >> ./log/install.txt - elif [ "$(uname -r)" = "7.5" ]; then - { pkg_add -v py3-pip-24.0; printf "\n\n"; } >> ./log/install.txt - elif [ "$(uname -r)" = "7.6" ]; then - { pkg_add -v py3-pip-24.2; printf "\n\n"; } >> ./log/install.txt - else - printf "[WGDashboard] %s Current OpenBSD version is not supported. Please install Python 3 Pip manually\n" "$heavy_crossmark" - printf "%s\n" "$helpMsg" - kill $TOP_PID - fi - ;; *) printf "[WGDashboard] %s Sorry, your OS is not supported. Currently the install script only support Debian-based, Red Hat-based OS. With experimental support for Alpine Linux.\n" "$heavy_crossmark" printf "%s\n" "$helpMsg"