1
0
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:
Donald Cheng Hong Zou 2021-09-03 14:22:14 -04:00
parent 37d254c827
commit 7ea486307a

View File

@ -18,16 +18,12 @@ help () {
} }
install_wgd(){ install_wgd(){
minimum_python_version=3.7 # Check Python3 version
python_version=$(python3 -c 'import sys; print(".".join(map(str, sys.version_info[0:2])))') version_pass=$(python3 -c 'import sys; print("1") if (sys.version_info.major == 3 and sys.version_info.minor >= 7) else print("0");')
if [ $python_version \> $minimum_python_version ] if [ $version_pass == "0" ]
then echo "true" then echo "| Wireguard Dashboard required Python3.7+ |\n"
else exit 1
echo "false"
fi fi
rm db/hi.txt > /dev/null 2>&1 rm db/hi.txt > /dev/null 2>&1
if [ ! -d "log" ] if [ ! -d "log" ]
then mkdir "log" then mkdir "log"