Merge remote-tracking branch 'origin/updating-configuration' into updating-configuration
This commit is contained in:
25
.github/workflows/main.yml
vendored
Normal file
25
.github/workflows/main.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
name: CI
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-18.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Prepare VM
|
||||
run: |
|
||||
unset LANG
|
||||
sudo apt update -qq
|
||||
sudo LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php -y
|
||||
sudo apt-get -qq purge graphviz* redis*
|
||||
sudo apt-get install -qq git python3-setuptools python3-dev python3-apt ccze tree
|
||||
sudo apt-get -qq autoremove --purge
|
||||
sudo mkdir -p /etc/mysql/conf.d
|
||||
echo -e '[client]\nuser = root\npassword = root\n' | sudo tee /etc/mysql/conf.d/my.cnf
|
||||
- name: Install WordOps
|
||||
run: sudo timeout 1800 bash install --travis
|
||||
- name: Run tests
|
||||
run: sudo timeout 1800 bash tests/travis.sh --actions
|
||||
@@ -13,6 +13,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
- [STACK] Nginx server_names_hash_bucket_size automated fix
|
||||
- [STACK] Nginx configuration rollback in case of failure after `wo stack upgrade --nginx
|
||||
- [STACK] Nginx ultimate bad bots blocker with `wo stack install --ngxblocker`
|
||||
- [STACK] Added support for custom Nginx compiled from source
|
||||
|
||||
### v3.9.9.1 - 2019-09-26
|
||||
|
||||
|
||||
10
install
10
install
@@ -9,7 +9,7 @@
|
||||
# -------------------------------------------------------------------------
|
||||
# wget -qO wo wops.cc && sudo bash wo
|
||||
# -------------------------------------------------------------------------
|
||||
# Version 3.9.9.1 - 2019-09-26
|
||||
# Version 3.9.9.1 - 2019-09-27
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
# CONTENTS
|
||||
@@ -70,6 +70,7 @@ while [ "$#" -gt 0 ]; do
|
||||
;;
|
||||
--travis)
|
||||
wo_travis="y"
|
||||
wo_force_install="y"
|
||||
;;
|
||||
-s | --silent)
|
||||
wo_force_install="y"
|
||||
@@ -77,9 +78,6 @@ while [ "$#" -gt 0 ]; do
|
||||
--purge | --uninstall)
|
||||
wo_purge="y"
|
||||
;;
|
||||
-w | --wufw | --without-ufw)
|
||||
ufw="n"
|
||||
;;
|
||||
-v | --version)
|
||||
wo_version="$2"
|
||||
shift
|
||||
@@ -496,6 +494,10 @@ wo_install() {
|
||||
# Clone Github repository if it doesn't exist
|
||||
wo_install_travis() {
|
||||
|
||||
if [ "$wo_force_install" = "y" ]; then
|
||||
[ ! -f "$HOME/.gitconfig" ] && { bash -c 'echo -e "[user]\n\tname = $USER\n\temail = root@$HOSTNAME.local" > $HOME/.gitconfig'; }
|
||||
fi
|
||||
|
||||
if [ -f "$HOME/.gitconfig" ]; then
|
||||
# install and redirect log to not print python package install
|
||||
python3 setup.py install
|
||||
|
||||
@@ -9,9 +9,11 @@ CRED="${CSI}1;31m"
|
||||
CGREEN="${CSI}1;32m"
|
||||
CEND="${CSI}0m"
|
||||
|
||||
apt-get -qq purge mysql* graphviz* redis*
|
||||
apt-get install -qq git python3-setuptools python3-dev python3-apt ccze tree
|
||||
sudo apt-get -qq autoremove --purge
|
||||
if [ -z "$1" ]; then
|
||||
apt-get -qq purge mysql* graphviz* redis*
|
||||
apt-get install -qq git python3-setuptools python3-dev python3-apt ccze tree
|
||||
sudo apt-get -qq autoremove --purge
|
||||
fi
|
||||
|
||||
exit_script() {
|
||||
curl --progress-bar --upload-file /var/log/wo/wordops.log https://transfer.vtbox.net/"$(basename wordops.log)" && echo ""
|
||||
|
||||
@@ -847,6 +847,8 @@ def site_package_check(self, stype):
|
||||
apt = ["nginx"] + WOVariables.wo_nginx
|
||||
# apt_packages = apt_packages + WOVariables.wo_nginx
|
||||
post_pref(self, apt, packages)
|
||||
elif os.file.isfile('/usr/sbin/nginx'):
|
||||
post_pref(self, WOVariables.wo_nginx, [])
|
||||
else:
|
||||
apt_packages = apt_packages + WOVariables.wo_nginx
|
||||
else:
|
||||
@@ -920,6 +922,16 @@ def site_package_check(self, stype):
|
||||
else:
|
||||
apt_packages = apt_packages + WOVariables.wo_php73
|
||||
|
||||
if self.app.pargs.ngxblocker:
|
||||
if not os.path.isdir('/etc/nginx/bots.d'):
|
||||
Log.debug(self, "Setting packages variable for ngxblocker")
|
||||
packages = packages + \
|
||||
[["https://raw.githubusercontent.com/"
|
||||
"mitchellkrogza/nginx-ultimate-bad-bot-blocker"
|
||||
"/master/install-ngxblocker",
|
||||
"/usr/local/sbin/install-ngxblocker",
|
||||
"ngxblocker"]]
|
||||
|
||||
return(stack.install(apt_packages=apt_packages, packages=packages,
|
||||
disp_msg=False))
|
||||
|
||||
|
||||
@@ -159,11 +159,11 @@ class WOStackController(CementBaseController):
|
||||
# Nginx
|
||||
if pargs.nginx:
|
||||
Log.debug(self, "Setting apt_packages variable for Nginx")
|
||||
|
||||
if not (WOAptGet.is_installed(self, 'nginx-custom')):
|
||||
if not (WOAptGet.is_installed(self, 'nginx-plus') or
|
||||
WOAptGet.is_installed(self, 'nginx')):
|
||||
apt_packages = apt_packages + WOVariables.wo_nginx
|
||||
if not os.path.isfile('/usr/sbin/nginx'):
|
||||
apt_packages = apt_packages + WOVariables.wo_nginx
|
||||
else:
|
||||
if WOAptGet.is_installed(self, 'nginx-plus'):
|
||||
Log.info(self, "NGINX PLUS Detected ...")
|
||||
@@ -177,7 +177,7 @@ class WOStackController(CementBaseController):
|
||||
apt = ["nginx"] + WOVariables.wo_nginx
|
||||
self.post_pref(apt, empty_packages)
|
||||
else:
|
||||
Log.debug(self, "Nginx Stable already installed")
|
||||
Log.debug(self, "Nginx already installed")
|
||||
|
||||
# Redis
|
||||
if pargs.redis:
|
||||
|
||||
@@ -94,7 +94,11 @@ class WOStackUpgradeController(CementBaseController):
|
||||
if WOAptGet.is_installed(self, 'nginx-custom'):
|
||||
apt_packages = apt_packages + WOVariables.wo_nginx
|
||||
else:
|
||||
Log.info(self, "Nginx Stable is not already installed")
|
||||
if os.path.isfile(self, '/usr/sbin/nginx'):
|
||||
Log.info(self, "Updating Nginx templates")
|
||||
post_pref(self, WOVariables.wo_nginx, [])
|
||||
else:
|
||||
Log.info(self, "Nginx Stable is not already installed")
|
||||
|
||||
if pargs.php:
|
||||
if WOAptGet.is_installed(self, 'php7.2-fpm'):
|
||||
|
||||
Reference in New Issue
Block a user