Final fix for wo version

This commit is contained in:
VirtuBox
2019-08-17 14:24:11 +02:00
parent 97e31e0797
commit 11b4c0b046

10
install
View File

@@ -104,14 +104,16 @@ if [ -z "$(command -v curl)" ]; then
apt-get -y install curl -qq
fi
readonly wo_version_new=$(curl -sL https://wops.cc/setup.py 2>&1 | grep "version='" | awk -F "'" '{print$2}' 2>&1)
if [ -f ./setup.py ]; then
readonly wo_version_new=$(grep "version='" setup.py | awk -F "'" '{print$2}' 2>&1)
else
readonly wo_version_new=$(curl -sL https://wops.cc/setup.py 2>&1 | grep "version='" | awk -F "'" '{print$2}' 2>&1)
fi
echo ""
wo_lib_echo "Welcome to WordOps install script v${wo_version_new}"
echo ""
###
# 1- Check whether lsb_release is installed, and if not, install it
###
@@ -195,7 +197,7 @@ wo_install_dep() {
apt-get -option=Dpkg::options::=--force-confmiss --option=Dpkg::options::=--force-confold --assume-yes install \
build-essential curl gzip python3 python3-apt python3-setuptools python3-requests python3-dev sqlite3 git tar software-properties-common pigz \
gnupg2 cron ccze rsync tree haveged ufw unattended-upgrades tzdata ntp > /dev/null 2>&1
add-apt-repository ppa:wordops/nginx-wo -yu
add-apt-repository ppa:wordops/nginx-wo -yu
else
# install dependencies
apt-get -option=Dpkg::options::=--force-confmiss --option=Dpkg::options::=--force-confold --assume-yes install \