mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2024-11-22 15:20:09 +01:00
Update wgd.sh
This commit is contained in:
parent
4c69fd4f60
commit
56044fa3f7
48
src/wgd.sh
48
src/wgd.sh
@ -97,36 +97,34 @@ _installPython(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
_installPythonVenv(){
|
_installPythonVenv(){
|
||||||
if ! $pythonExecutable -m venv -h > /dev/null 2>&1
|
if [ "$pythonExecutable" = "python3" ]; then
|
||||||
then
|
if ! $pythonExecutable -m venv -h > /dev/null 2>&1
|
||||||
case "$OS" in
|
then
|
||||||
ubuntu|debian)
|
case "$OS" in
|
||||||
if [ "$pythonExecutable" = "python3" ]; then
|
ubuntu|debian)
|
||||||
{ sudo apt update ; sudo apt-get install -y python3-venv; printf "\n\n"; } &>> ./log/install.txt
|
{ sudo apt update ; sudo apt-get install -y python3-venv; printf "\n\n"; } &>> ./log/install.txt
|
||||||
else
|
;;
|
||||||
sudo apt-get install ${pythonExecutable}-venv
|
centos|fedora|redhat)
|
||||||
printf "\n\n";
|
if command -v dnf &> /dev/null; then
|
||||||
# { sudo apt-get update; sudo apt-get install ${pythonExecutable}-venv; } &>> ./log/install.txt
|
{ sudo dnf install -y python3-virtualenv; printf "\n\n"; } >> ./log/install.txt
|
||||||
fi
|
else
|
||||||
;;
|
{ sudo yum install -y python3-virtualenv; printf "\n\n"; } >> ./log/install.txt
|
||||||
centos|fedora|redhat)
|
fi
|
||||||
if command -v dnf &> /dev/null; then
|
;;
|
||||||
{ sudo dnf install -y python3-virtualenv; printf "\n\n"; } >> ./log/install.txt
|
*)
|
||||||
else
|
printf "[WGDashboard] %s Sorry, your OS is not supported. Currently the install script only support Debian-based, Red Hat-based OS." "$heavy_crossmark"
|
||||||
{ sudo yum install -y python3-virtualenv; printf "\n\n"; } >> ./log/install.txt
|
printf "%s\n" "$helpMsg"
|
||||||
fi
|
kill -s TERM $TOP_PID
|
||||||
;;
|
;;
|
||||||
*)
|
esac
|
||||||
printf "[WGDashboard] %s Sorry, your OS is not supported. Currently the install script only support Debian-based, Red Hat-based OS." "$heavy_crossmark"
|
fi
|
||||||
printf "%s\n" "$helpMsg"
|
else
|
||||||
kill -s TERM $TOP_PID
|
{ sudo apt-get update; sudo apt-get install ${pythonExecutable}-venv; } &>> ./log/install.txt
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! $pythonExecutable -m venv -h > /dev/null 2>&1
|
if ! $pythonExecutable -m venv -h > /dev/null 2>&1
|
||||||
then
|
then
|
||||||
printf "[WGDashboard] %s Python Virtual Environment is still not installed, halting script now.\n"
|
printf "[WGDashboard] %s Python Virtual Environment is still not installed, halting script now.\n" "$heavy_crossmark"
|
||||||
printf "%s\n" "$helpMsg"
|
printf "%s\n" "$helpMsg"
|
||||||
else
|
else
|
||||||
printf "[WGDashboard] %s Python Virtual Environment is installed\n" "$heavy_checkmark"
|
printf "[WGDashboard] %s Python Virtual Environment is installed\n" "$heavy_checkmark"
|
||||||
|
Loading…
Reference in New Issue
Block a user