mirror of
https://github.com/donaldzou/WGDashboard
synced 2025-02-26 05:58:47 +00:00
Dropping support plan to OpenBSD
This commit is contained in:
parent
71ee784003
commit
8e2934533b
@ -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()
|
||||
|
41
src/wgd.sh
41
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"
|
||||
|
Loading…
Reference in New Issue
Block a user