Fix install on raspberry pi 4

This commit is contained in:
VirtuBox
2020-02-26 10:01:27 +01:00
parent 930e92ac03
commit b1e9262f92
2 changed files with 25 additions and 11 deletions

View File

@@ -7,9 +7,9 @@
# Copyright (c) 2019-2020 - WordOps
# This script is licensed under M.I.T
# -------------------------------------------------------------------------
# wget -qO wo wops.cc && sudo bash wo
# wget -qO wo wops.cc && sudo -E bash wo
# -------------------------------------------------------------------------
# Version 3.11.4 - 2020-01-17
# Version 3.11.5 - 2020-02-11
# -------------------------------------------------------------------------
# CONTENTS
@@ -433,10 +433,10 @@ wo_install() {
rm -f /usr/local/bin/wo
if [ "$wo_branch" = "master" ]; then
python3 -m pip uninstall wo -y
python3 -m pip install --upgrade wordops
python3 -m pip install -I wordops
else
python3 -m pip uninstall wo -y
python3 -m pip install -U "git+git://github.com/WordOps/WordOps.git@$wo_branch#egg=wordops"
python3 -m pip install -I "git+git://github.com/WordOps/WordOps.git@$wo_branch#egg=wordops"
fi
cp -rf /usr/local/lib/python3."$python_ver"/dist-packages/usr/* /usr/
cp -rn /usr/local/lib/python3."$python_ver"/dist-packages/etc/* /etc/

View File

@@ -322,14 +322,28 @@ def post_pref(self, apt_packages, packages, upgrade=False):
os.makedirs('/etc/nginx/sites-enabled')
# 22222 port settings
if os.path.exists('/etc/nginx/sites-available/22222'):
Log.debug(self, "looking for the current backend port")
for line in open('/etc/nginx/sites-available/22222',
encoding='utf-8'):
if 'listen' in line:
listen_line = line.strip()
break
port = (listen_line).split(' ')
current_backend_port = (port[1]).strip()
else:
current_backend_port = '22222'
if 'current_backend_port' not in locals():
current_backend_port = '22222'
data = dict(webroot=ngxroot,
release=WOVar.wo_version, port='22222')
if not WOFileUtils.grepcheck(
self, 'WordOps', '/etc/nginx/sites-available/22222'):
WOTemplate.deploy(
self,
'/etc/nginx/sites-available/22222',
'22222.mustache', data, overwrite=True)
release=WOVar.wo_version, port=current_backend_port)
WOTemplate.deploy(
self,
'/etc/nginx/sites-available/22222',
'22222.mustache', data, overwrite=True)
passwd = ''.join([random.choice
(string.ascii_letters + string.digits)
for n in range(24)])