1
0
mirror of https://github.com/donaldzou/WGDashboard.git synced 2024-11-22 07:10:09 +01:00

Update wgd.sh

This commit is contained in:
Donald Zou 2024-08-16 03:32:28 -04:00
parent aa1d0aabd2
commit 798a3632cf

View File

@ -100,26 +100,23 @@ _installPython(){
_installPythonVenv(){ _installPythonVenv(){
if [ "$pythonExecutable" = "python3" ]; then if [ "$pythonExecutable" = "python3" ]; then
if ! $pythonExecutable -m venv -h > /dev/null 2>&1 case "$OS" in
then ubuntu|debian)
case "$OS" in { sudo apt update ; sudo apt-get install -y python3-venv; printf "\n\n"; } &>> ./log/install.txt
ubuntu|debian) ;;
{ sudo apt update ; sudo apt-get install -y python3-venv; printf "\n\n"; } &>> ./log/install.txt centos|fedora|redhat)
;; if command -v dnf &> /dev/null; then
centos|fedora|redhat) { sudo dnf install -y python3-virtualenv; printf "\n\n"; } >> ./log/install.txt
if command -v dnf &> /dev/null; then else
{ sudo dnf install -y python3-virtualenv; printf "\n\n"; } >> ./log/install.txt { sudo yum install -y python3-virtualenv; printf "\n\n"; } >> ./log/install.txt
else fi
{ sudo yum install -y python3-virtualenv; printf "\n\n"; } >> ./log/install.txt ;;
fi *)
;; printf "[WGDashboard] %s Sorry, your OS is not supported. Currently the install script only support Debian-based, Red Hat-based OS." "$heavy_crossmark"
*) printf "%s\n" "$helpMsg"
printf "[WGDashboard] %s Sorry, your OS is not supported. Currently the install script only support Debian-based, Red Hat-based OS." "$heavy_crossmark" kill -s TERM $TOP_PID
printf "%s\n" "$helpMsg" ;;
kill -s TERM $TOP_PID esac
;;
esac
fi
else else
{ sudo apt-get update; sudo apt-get install ${pythonExecutable}-venv; } &>> ./log/install.txt { sudo apt-get update; sudo apt-get install ${pythonExecutable}-venv; } &>> ./log/install.txt
fi fi