mirror of
https://github.com/donaldzou/WGDashboard
synced 2025-02-26 05:58:47 +00:00
Adding support to OpenBSD
This commit is contained in:
parent
b37d889de9
commit
e1e147c8f0
33
src/wgd.sh
33
src/wgd.sh
@ -76,9 +76,12 @@ _determineOS(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
_installPython(){
|
_installPython(){
|
||||||
|
|
||||||
|
{ printf "\n\n [Installing Python] [%s] \n\n""$(date)"; } >> ./log/install.txt
|
||||||
|
|
||||||
case "$OS" in
|
case "$OS" in
|
||||||
ubuntu|debian)
|
ubuntu|debian)
|
||||||
{ sudo apt update ; sudo apt-get install -y python3 net-tools; printf "\n\n"; } &>> ./log/install.txt
|
{ sudo apt update ; sudo apt-get install -y python3 net-tools; printf "\n\n"; } >> ./log/install.txt
|
||||||
;;
|
;;
|
||||||
centos|fedora|redhat|rhel|almalinux|rocky)
|
centos|fedora|redhat|rhel|almalinux|rocky)
|
||||||
if command -v dnf &> /dev/null; then
|
if command -v dnf &> /dev/null; then
|
||||||
@ -116,6 +119,7 @@ _installPython(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
_installPythonVenv(){
|
_installPythonVenv(){
|
||||||
|
{ printf "\n\n [Installing Python Venv] [%s] \n\n""$(date)"; } >> ./log/install.txt
|
||||||
if [ "$pythonExecutable" = "python3" ]; then
|
if [ "$pythonExecutable" = "python3" ]; then
|
||||||
case "$OS" in
|
case "$OS" in
|
||||||
ubuntu|debian)
|
ubuntu|debian)
|
||||||
@ -131,6 +135,19 @@ _installPythonVenv(){
|
|||||||
alpine)
|
alpine)
|
||||||
{ sudo apk update; sudo apk add py3-virtualenv ; printf "\n\n"; } >> ./log/install.txt
|
{ 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 "[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"
|
printf "%s\n" "$helpMsg"
|
||||||
@ -155,6 +172,7 @@ _installPythonVenv(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
_installPythonPip(){
|
_installPythonPip(){
|
||||||
|
{ printf "\n\n [Installing Python Pip] [%s] \n\n""$(date)"; } >> ./log/install.txt
|
||||||
if ! $pythonExecutable -m pip -h > /dev/null 2>&1
|
if ! $pythonExecutable -m pip -h > /dev/null 2>&1
|
||||||
then
|
then
|
||||||
case "$OS" in
|
case "$OS" in
|
||||||
@ -175,6 +193,19 @@ _installPythonPip(){
|
|||||||
alpine)
|
alpine)
|
||||||
{ sudo apk update; sudo apk add py3-pip --no-cache; printf "\n\n"; } >> ./log/install.txt
|
{ 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 "[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"
|
printf "%s\n" "$helpMsg"
|
||||||
|
Loading…
Reference in New Issue
Block a user