Fix for wo upgrade

This commit is contained in:
VirtuBox
2019-08-17 13:40:28 +02:00
parent 3b01f39507
commit d772199f26
6 changed files with 388 additions and 370 deletions

View File

@@ -1,344 +1,351 @@
# Changelog # Changelog
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
## Releases ## Releases
### v3.9.x - [Unreleased] ### v3.9.x - [Unreleased]
#### Changed ### v3.9.8.1 - 2019-08-17
- Extra Nginx directives moved from nginx.conf to conf.d/tweaks.conf #### Added
#### Fixed - WordOps backend is automatically secured by the first Let's Encrypt SSL certificate issued
- MySQLTuner installation #### Changed
- `wo stack remove/purge --all`
- variable substitution in install script - Extra Nginx directives moved from nginx.conf to conf.d/tweaks.conf
### v3.9.8 - 2019-08-16 #### Fixed
#### Added - MySQLTuner installation
- `wo stack remove/purge --all`
- Allow web browser caching for json and webmanifest files - variable substitution in install script
- nginx-core.mustache template used to render nginx.conf during stack setup - `wo stack upgrade --phpmyadmin/--dashboard`
- APT Packages configuration step with `wo stack upgrade` to apply new configurations
- Cloudflare restore real_ip configuration ### v3.9.8 - 2019-08-16
- WP-Rocket plugin support with the flag `--wprocket`
- Cache-Enabler plugin support with the flag `--wpce` #### Added
- Install unattended-upgrade and enable automated security updates
- Enable time synchronization with ntp - Allow web browser caching for json and webmanifest files
- Additional cache exception for woocommerce - nginx-core.mustache template used to render nginx.conf during stack setup
- APT Packages configuration step with `wo stack upgrade` to apply new configurations
#### Changed - Cloudflare restore real_ip configuration
- WP-Rocket plugin support with the flag `--wprocket`
- Do not force Nginx upgrade if a custom Nginx package compiled with nginx-ee is detected - Cache-Enabler plugin support with the flag `--wpce`
- Gzip enabled again by default with configuration in /etc/nginx/conf.d/gzip.conf - Install unattended-upgrade and enable automated security updates
- Brotli configuration moved in /etc/nginx/conf.d/brotli.conf.disabled (disabled by default) - Enable time synchronization with ntp
- Moving package configuration in a new plugin stack_pref.py - Additional cache exception for woocommerce
- Cleanup templates by removing all doublons (with/without php7) and replacing them with variables
- Updated Nginx to v1.16.1 in response to HTTP/2 vulnerabilites discovered #### Changed
- Disable temporary adding swap feature (not working)
- `wo stack upgrade --nginx` is now able to apply new configurations during `wo update`, it highly reduce upgrade duration - Do not force Nginx upgrade if a custom Nginx package compiled with nginx-ee is detected
- Gzip enabled again by default with configuration in /etc/nginx/conf.d/gzip.conf
#### Fixed - Brotli configuration moved in /etc/nginx/conf.d/brotli.conf.disabled (disabled by default)
- Moving package configuration in a new plugin stack_pref.py
- Error in HSTS header syntax - Cleanup templates by removing all doublons (with/without php7) and replacing them with variables
- Updated Nginx to v1.16.1 in response to HTTP/2 vulnerabilites discovered
### v3.9.7.2 - 2019-08-12 - Disable temporary adding swap feature (not working)
- `wo stack upgrade --nginx` is now able to apply new configurations during `wo update`, it highly reduce upgrade duration
#### Fixed
#### Fixed
- redis.conf permissions additional fix
- Error in HSTS header syntax
### v3.9.7.1 - 2019-08-09
### v3.9.7.2 - 2019-08-12
#### Changed
#### Fixed
- Set WordOps backend password length from 16 to 24
- Upgrade framework cement to 2.6.0 - redis.conf permissions additional fix
- Upgrade PyMySQL to 0.9.3
- Upgrade Psutil to 5.6.3 ### v3.9.7.1 - 2019-08-09
#### Fixed #### Changed
- Missing import in `wo sync` - Set WordOps backend password length from 16 to 24
- redis.conf incorrect permissions - Upgrade framework cement to 2.6.0
- Upgrade PyMySQL to 0.9.3
### v3.9.7 - 2019-08-02 - Upgrade Psutil to 5.6.3
#### Added #### Fixed
- MySQL configuration tuning - Missing import in `wo sync`
- Cronjob to optimize MySQL databases weekly - redis.conf incorrect permissions
- WO-kernel systemd service to automatically apply kernel tweaks on server startup
- Proftpd stack now secured with TLS ### v3.9.7 - 2019-08-02
- New Nginx package built with Brotli from operating system libraries
- Brotli configuration with only well compressible MIME types #### Added
- WordPress site url automatically updated to `https://domain.tld` when using `-le/--letsencrypt` flag
- More informations during certificate issuance about validation mode selected - MySQL configuration tuning
- `--php72` as alternative for `--php` - Cronjob to optimize MySQL databases weekly
- Automated removal of the deprecated variable `ssl on;` in previous Nginx ssl.conf - WO-kernel systemd service to automatically apply kernel tweaks on server startup
- Project Contributing guidelines - Proftpd stack now secured with TLS
- Project Code of conduct - New Nginx package built with Brotli from operating system libraries
- Brotli configuration with only well compressible MIME types
#### Changed - WordPress site url automatically updated to `https://domain.tld` when using `-le/--letsencrypt` flag
- More informations during certificate issuance about validation mode selected
- `wo maintenance` refactored - `--php72` as alternative for `--php`
- Improved debug log - Automated removal of the deprecated variable `ssl on;` in previous Nginx ssl.conf
- Updated Nginx configuration process to not overwrite files with custom data (htpasswd-wo, acl.conf etc..) - Project Contributing guidelines
- Adminer updated to v4.7.2 - Project Code of conduct
- eXtplorer updated to v2.1.13
- Removed WordOps version from the Nginx header X-Powered-By to avoid possible security issues #### Changed
- Several code quality improvements to speed up WordOps execution
- Few adjustements on PHP-FPM configuration (max_input_time,opcache.consistency_checks) - `wo maintenance` refactored
- Added /dev/urandom & /dev/shm to open_basedir in PHP-FPM configuration - Improved debug log
- Updated Nginx configuration process to not overwrite files with custom data (htpasswd-wo, acl.conf etc..)
#### Fixed - Adminer updated to v4.7.2
- eXtplorer updated to v2.1.13
- Kernel tweaks were not applied without server reboot - Removed WordOps version from the Nginx header X-Powered-By to avoid possible security issues
- Fail2ban standalone install - Several code quality improvements to speed up WordOps execution
- `wo stack purge --all` error due to PHP7.3 check - Few adjustements on PHP-FPM configuration (max_input_time,opcache.consistency_checks)
- Nginx helper configuration during plugin install for Nginx fastcgi_cache and redis-cache - Added /dev/urandom & /dev/shm to open_basedir in PHP-FPM configuration
- phpRedisAdmin stack installation
- Fixed Travis CI build on pull requests #### Fixed
- Nginx `server_names_hash_bucket_size` variable error after WordOps upgrade
- Kernel tweaks were not applied without server reboot
### v3.9.6.2 - 2019-07-24 - Fail2ban standalone install
- `wo stack purge --all` error due to PHP7.3 check
#### Changed - Nginx helper configuration during plugin install for Nginx fastcgi_cache and redis-cache
- phpRedisAdmin stack installation
- Improve `wo update` process duration - Fixed Travis CI build on pull requests
- Improve package install/upgrade/remove process - Nginx `server_names_hash_bucket_size` variable error after WordOps upgrade
#### Fixed ### v3.9.6.2 - 2019-07-24
- phpMyAdmin archive download link archive #### Changed
- Arguments `--letsencrypt=clean/purge`
- Incorrect directory removal during stack upgrade - Improve `wo update` process duration
- Improve package install/upgrade/remove process
### v3.9.6.1 - 2019-07-23
#### Fixed
#### Fixed
- phpMyAdmin archive download link archive
- Typo in `--letsencrypt=subdomain` - Arguments `--letsencrypt=clean/purge`
- phpMyAdmin upgrade archive extraction - Incorrect directory removal during stack upgrade
- Error in the command `wo update`. Please `wo update --beta` as workaround
### v3.9.6.1 - 2019-07-23
### v3.9.6 - 2019-07-20
#### Fixed
#### Added
- Typo in `--letsencrypt=subdomain`
- New Nginx package on Ubuntu with Cloudflare HTTP/2 HPACK and Dynamic TLS records - phpMyAdmin upgrade archive extraction
- phpMyAdmin upgrade with `wo stack upgrade --phpmyadmin` - Error in the command `wo update`. Please `wo update --beta` as workaround
- Wildcard SSL Certificates support with DNS validation
- Let's Encrypt DNS API support (Cloudflare, DigitalOcean, etc ..) on domain, subdomain, and wildcard ### v3.9.6 - 2019-07-20
- Flag `--letsencrypt=clean` to purge a previous SSL configuration
- Support for Debian 10 buster (testing - not ready for production) #### Added
- Fail2ban with custom jails to secure WordPress & SSH
- Variable `keylength` in /etc/wo/wo.conf to define letsencrypt certificate keylenght - New Nginx package on Ubuntu with Cloudflare HTTP/2 HPACK and Dynamic TLS records
- ProFTPd stack with UFW & Fail2ban configurationz - phpMyAdmin upgrade with `wo stack upgrade --phpmyadmin`
- Beta branch and command `wo update --beta` for beta releases - Wildcard SSL Certificates support with DNS validation
- Extra directives in wp-config.php (limit posts revisions, set max_memory, enable auto-update for minor-releases) - Let's Encrypt DNS API support (Cloudflare, DigitalOcean, etc ..) on domain, subdomain, and wildcard
- Flag `--letsencrypt=clean` to purge a previous SSL configuration
#### Fixed - Support for Debian 10 buster (testing - not ready for production)
- Fail2ban with custom jails to secure WordPress & SSH
- Nginx was not reloaded after enabling HSTS - Variable `keylength` in /etc/wo/wo.conf to define letsencrypt certificate keylenght
- Netdata, Composer & Fail2Ban stack remove and purge - ProFTPd stack with UFW & Fail2ban configurationz
- WordPress not installed by `wo site update` with basic php73 sites - Beta branch and command `wo update --beta` for beta releases
- Extra directives in wp-config.php (limit posts revisions, set max_memory, enable auto-update for minor-releases)
### v3.9.5.4 - 2019-07-13
#### Fixed
#### Added
- Nginx was not reloaded after enabling HSTS
- New Nginx package on Ubuntu with TLS v1.3 support (OpenSSL 1.1.1c) - Netdata, Composer & Fail2Ban stack remove and purge
- Netdata upgrade with `wo stack upgrade --netdata` - WordPress not installed by `wo site update` with basic php73 sites
- Netdata stack remove/purge
### v3.9.5.4 - 2019-07-13
#### Changed
#### Added
- phpRedisAdmin is now installed with the stack `--admin`
- Remove memcached - not required anymore - New Nginx package on Ubuntu with TLS v1.3 support (OpenSSL 1.1.1c)
- Netdata upgrade with `wo stack upgrade --netdata`
#### Fixed - Netdata stack remove/purge
- phpRedisAdmin installation #### Changed
- Duplicated locations /robots.txt after upgrade to v3.9.5.3
- Let's Encrypt stack `wo site update --letsencrypt/--letsencrypt=off` - phpRedisAdmin is now installed with the stack `--admin`
- pt-query-advisor dead link - Remove memcached - not required anymore
- Netdata persistant configuration
#### Fixed
### v3.9.5.3 - 2019-06-18
- phpRedisAdmin installation
#### Added - Duplicated locations /robots.txt after upgrade to v3.9.5.3
- Let's Encrypt stack `wo site update --letsencrypt/--letsencrypt=off`
- Argument `--preserve` with the command `wo update` to keep current Nginx configuration - pt-query-advisor dead link
- Netdata persistant configuration
#### Fixed
### v3.9.5.3 - 2019-06-18
- Nginx upgrade failure when running wo update
#### Added
### v3.9.5.2 - 2019-06-17
- Argument `--preserve` with the command `wo update` to keep current Nginx configuration
#### Added
#### Fixed
- Non-interactive install/upgrade
- Argument `--force` with the command `wo update` - Nginx upgrade failure when running wo update
- Argument `-s|--silent` to perform non interactive installation
### v3.9.5.2 - 2019-06-17
#### Changed
#### Added
- robots.txt location block moved from locations-wo.conf to wpcommon(-php7).php
- Non-interactive install/upgrade
#### Fixed - Argument `--force` with the command `wo update`
- Argument `-s|--silent` to perform non interactive installation
- WP_CACHE_KEY_SALT set twice with wpredis
- WordOps version check when using `wo update` #### Changed
- robots.txt file download if not created
- PHP-FPM socket path in stub_status.conf : PR [#82](https://github.com/WordOps/WordOps/pull/82) - robots.txt location block moved from locations-wo.conf to wpcommon(-php7).php
### v3.9.5.1 - 2019-05-10 #### Fixed
#### Fixed - WP_CACHE_KEY_SALT set twice with wpredis
- WordOps version check when using `wo update`
- Adminer download link - robots.txt file download if not created
- PHP-FPM socket path in stub_status.conf : PR [#82](https://github.com/WordOps/WordOps/pull/82)
### v3.9.5 - 2019-05-02
### v3.9.5.1 - 2019-05-10
#### Added
#### Fixed
- IPv6 support with HTTPS
- Brotli support in Nginx - Adminer download link
- Let's Encrypt support with --proxy
- Install script handle migration from EEv3 ### v3.9.5 - 2019-05-02
- load-balancing on unix socket for php-fpm
- stub_status vhost for metrics #### Added
- `--letsencrypt=subdomain` option
- opcache optimization for php-fpm - IPv6 support with HTTPS
- EasyEngine configuration backup before migration - Brotli support in Nginx
- EasyEngine configuration cleanup after migration - Let's Encrypt support with --proxy
- WordOps configuration backup before upgrade - Install script handle migration from EEv3
- Previous acme.sh certs migration - load-balancing on unix socket for php-fpm
- "wo maintenance" command to perform server package update & cleanup - stub_status vhost for metrics
- Support for Netdata on backend : https://server.hostname:22222/netdata/ - `--letsencrypt=subdomain` option
- New Stacks : composer and netdata - opcache optimization for php-fpm
- additional argument for letsencrypt : --hsts - EasyEngine configuration backup before migration
- Clean Theme for adminer - EasyEngine configuration cleanup after migration
- Credits for tools shipped with WordOps - WordOps configuration backup before upgrade
- Cache exception for Easy Digital Download - Previous acme.sh certs migration
- Additional cache exceptions for Woocommerce - "wo maintenance" command to perform server package update & cleanup
- MySQL monitoring with Netdata - Support for Netdata on backend : https://server.hostname:22222/netdata/
- WordOps-dashboard on 22222, can be installed with `wo stack install` - New Stacks : composer and netdata
- Extplorer filemanager in WordOps backend - additional argument for letsencrypt : --hsts
- Enable OSCP Stapling with Let's Encrypt - Clean Theme for adminer
- Compress database backup with pigz (faster than gzip) before updating sites - Credits for tools shipped with WordOps
- Support for Ubuntu 19.04 (disco) - few php extensions missing - Cache exception for Easy Digital Download
- Support for Raspbian 9 (stretch) - tested on Raspberry Pi 3b+ - Additional cache exceptions for Woocommerce
- backup letsencrypt certificate before upgrade - MySQL monitoring with Netdata
- directives emergency_restart_threshold & emergency_restart_interval to restart php-fpm in case of failure - WordOps-dashboard on 22222, can be installed with `wo stack install`
- EasyEngine cronjob removal during install - Extplorer filemanager in WordOps backend
- Kernel tweaks via systctl.conf - Enable OSCP Stapling with Let's Encrypt
- open_basedir on php-fpm process to forbid access with php outside of /var/www & /run/nginx-cache - Compress database backup with pigz (faster than gzip) before updating sites
- Support for Ubuntu 19.04 (disco) - few php extensions missing
#### Changed - Support for Raspbian 9 (stretch) - tested on Raspberry Pi 3b+
- backup letsencrypt certificate before upgrade
- letsencrypt stack refactored with acme.sh - directives emergency_restart_threshold & emergency_restart_interval to restart php-fpm in case of failure
- letsencrypt validation with webroot folder - EasyEngine cronjob removal during install
- hardened nginx ssl_ecdh_curve - Kernel tweaks via systctl.conf
- Update phpredisadmin - open_basedir on php-fpm process to forbid access with php outside of /var/www & /run/nginx-cache
- Increase MySQL root password size to 24 characters
- Increase MySQL users password size to 24 characters #### Changed
- Nginx locations template is the same for php7.2 & 7.3
- backend SSL configuration now stored in /var/www/22222/conf/nginx/ssl.conf - letsencrypt stack refactored with acme.sh
- Install Netdata with static pre-built binaries instead of having to compile it from source - letsencrypt validation with webroot folder
- Nginx updated to new stable release (1.16.0) - hardened nginx ssl_ecdh_curve
- New packages (phpmyadmin, adminer, composer) are not download in /tmp anymore - Update phpredisadmin
- Increase MySQL root password size to 24 characters
#### Fixed - Increase MySQL users password size to 24 characters
- Nginx locations template is the same for php7.2 & 7.3
- PHP 7.3 extras when php 7.2 isn't installed - backend SSL configuration now stored in /var/www/22222/conf/nginx/ssl.conf
- acme.sh installation - Install Netdata with static pre-built binaries instead of having to compile it from source
- acme.sh alias with config home variable - Nginx updated to new stable release (1.16.0)
- deb.sury.org repository gpg key - New packages (phpmyadmin, adminer, composer) are not download in /tmp anymore
- Nginx upgrade from previous WordOps release
- Force new Nginx templates during update #### Fixed
- Error message about missing my.cnf file during upgrade
- PHP 7.2 & PHP 7.3 pool configuration during upgrade - PHP 7.3 extras when php 7.2 isn't installed
- WordOps backup directory creation before upgrade - acme.sh installation
- EasyEngine database sync during migration - acme.sh alias with config home variable
- fix command "wo info" - deb.sury.org repository gpg key
- phpmyadmin install with composer - Nginx upgrade from previous WordOps release
- command "wo clean --memcached" - Force new Nginx templates during update
- phpredisadmin setup - Error message about missing my.cnf file during upgrade
- --hsts flag with basic html site - PHP 7.2 & PHP 7.3 pool configuration during upgrade
- hsts flag on site not secure with letsencrypt - WordOps backup directory creation before upgrade
- fix import of previous acme.sh certificate - EasyEngine database sync during migration
- fix proxy webroot folder creation - fix command "wo info"
- phpmyadmin install with composer
### v3.9.4 - 2019-03-15 - command "wo clean --memcached"
- phpredisadmin setup
#### Added - --hsts flag with basic html site
- hsts flag on site not secure with letsencrypt
- Nginx module nginx_vts - fix import of previous acme.sh certificate
- Migration script from nginx-ee to nginx-wo - fix proxy webroot folder creation
- Support for Debian 9 (testing)
- New Nginx build v1.14.2 ### v3.9.4 - 2019-03-15
#### Changed #### Added
- Update WP-CLI version to 2.1.0 - Nginx module nginx_vts
- Update Adminer to 4.6.2 - Migration script from nginx-ee to nginx-wo
- Update predis to v1.1.1 - Support for Debian 9 (testing)
- Refactored nginx.conf - New Nginx build v1.14.2
- Removed HHVM Stack
- Removed old linux distro checks #### Changed
- Replace wo-acme-sh by acme.sh
- Update WP-CLI version to 2.1.0
#### Fixed - Update Adminer to 4.6.2
- Update predis to v1.1.1
- Outdated Nginx ssl_ciphers suite - Refactored nginx.conf
- Debian 9 nginx build - Removed HHVM Stack
- Removed old linux distro checks
### v3.9.3 - 2019-03-07 - Replace wo-acme-sh by acme.sh
#### Changed #### Fixed
- Updated Nginx fastcgi_cache templates - Outdated Nginx ssl_ciphers suite
- Updated Nginx redis_cache templates - Debian 9 nginx build
- Updated Nginx wp-super-cache templates
- Updated Nginx configuration for WordPress 5.0 ### v3.9.3 - 2019-03-07
- remove --experimental args
- MariaDB version bumped to 10.3 #### Changed
- Refactored Changelog
- Updated WO manual - Updated Nginx fastcgi_cache templates
- Updated WO bash_completion - Updated Nginx redis_cache templates
- Refactored README.md - Updated Nginx wp-super-cache templates
- Updated Nginx configuration for WordPress 5.0
#### Added - remove --experimental args
- MariaDB version bumped to 10.3
- Add WebP image support with Nginx mapping - Refactored Changelog
- Add PHP 7.3 support - Updated WO manual
- WordPress $skip_cache variable mapping - Updated WO bash_completion
- Refactored README.md
#### Fixed
#### Added
- Nginx variable $webp_suffix on fresh install ([#21](https://github.com/WordOps/WordOps/issues/21))
- wo update command ([#7](https://github.com/WordOps/WordOps/issues/7)) - Add WebP image support with Nginx mapping
- Fix php services management ([#12](https://github.com/WordOps/WordOps/issues/12)) - Add PHP 7.3 support
- Fix WP-CLI install - WordPress $skip_cache variable mapping
### v3.9.2 - 2018-11-30 #### Fixed
#### Changed - Nginx variable $webp_suffix on fresh install ([#21](https://github.com/WordOps/WordOps/issues/21))
- wo update command ([#7](https://github.com/WordOps/WordOps/issues/7))
- Re-branded the fork to WordOps - Fix php services management ([#12](https://github.com/WordOps/WordOps/issues/12))
- Codebase cleanup - Fix WP-CLI install
- Set PHP 7.2 as the default
- Included support for newer OS releases ### v3.9.2 - 2018-11-30
- Reworked the HTTPS configuration
- Added more automated testing with Redis #### Changed
- Replaced Postfix with smtp-cli
- Dropped mail services - Re-branded the fork to WordOps
- Codebase cleanup
- Set PHP 7.2 as the default
- Included support for newer OS releases
- Reworked the HTTPS configuration
- Added more automated testing with Redis
- Replaced Postfix with smtp-cli
- Dropped mail services
- Dropped w3tc support - Dropped w3tc support

View File

@@ -79,7 +79,7 @@ _wo_complete()
;; ;;
"upgrade" ) "upgrade" )
COMPREPLY=( $(compgen \ COMPREPLY=( $(compgen \
-W "--web --nginx --php --php73 --mysql --all --netdata --composer --phpmyadmin --no-prompt --wpcli" \ -W "--web --nginx --php --php73 --mysql --all --netdata --composer --phpmyadmin --dashboard --no-prompt --wpcli" \
-- $cur) ) -- $cur) )
;; ;;
"start" | "stop" | "reload" | "restart" | "status") "start" | "stop" | "reload" | "restart" | "status")
@@ -159,13 +159,13 @@ _wo_complete()
"create") "create")
COMPREPLY=( $(compgen \ COMPREPLY=( $(compgen \
-W "--user --pass --email --html --php --php73 --mysql --wp --wpsubdir --wpsubdomain --wpfc --wpsc --proxy= --wpredis --wprocket --letsencrypt --letsencrypt=subdomain --letsencrypt=wildcard -le -le=subdomain -le=wildcard --dns --dns=dns_cf --dns=dns_do" \ -W "--user --pass --email --html --php --php73 --mysql --wp --wpsubdir --wpsubdomain --wpfc --wpsc --proxy= --wpredis --wprocket --wpce --letsencrypt --letsencrypt=subdomain --letsencrypt=wildcard -le -le=subdomain -le=wildcard --dns --dns=dns_cf --dns=dns_do" \
-- $cur) ) -- $cur) )
;; ;;
"update") "update")
COMPREPLY=( $(compgen \ COMPREPLY=( $(compgen \
-W "--password --php --php73 --mysql --wp --wpsubdir --wpsubdomain --wpfc --wpsc --wpredis --wprocket --letsencrypt --letsencrypt=subdomain --letsencrypt=off --letsencrypt=renew --letsencrypt=clean -le -le=subdomain -le=wildcard --dns --dns=dns_cf --dns=dns_do" \ -W "--password --php --php73 --mysql --wp --wpsubdir --wpsubdomain --wpfc --wpsc --wpredis --wprocket --wpce --letsencrypt --letsencrypt=subdomain --letsencrypt=off --letsencrypt=renew --letsencrypt=clean -le -le=subdomain -le=wildcard --dns --dns=dns_cf --dns=dns_do" \
-- $cur) ) -- $cur) )
;; ;;
"delete") "delete")
@@ -211,9 +211,9 @@ _wo_complete()
"--wp") "--wp")
if [ ${COMP_WORDS[1]} != "debug" ]; then if [ ${COMP_WORDS[1]} != "debug" ]; then
if [ ${COMP_WORDS[2]} == "create" ]; then if [ ${COMP_WORDS[2]} == "create" ]; then
retlist="--wp --wpsc --wpfc --user --email --pass --wpredis --wprocket --letsencrypt -le --letsencrypt=subdomain --letsencrypt=wildcard --dns --dns=dns_cf --dns=dns_do --php73" retlist="--wp --wpsc --wpfc --user --email --pass --wpredis --wprocket --wpce --letsencrypt -le --letsencrypt=subdomain --letsencrypt=wildcard --dns --dns=dns_cf --dns=dns_do --php73"
elif [ ${COMP_WORDS[2]} == "update" ]; then elif [ ${COMP_WORDS[2]} == "update" ]; then
retlist="--wp --wpfc --wpsc --php73 --php73=off --wpredis --wprocket --letsencrypt --letsencrypt=subdomain --letsencrypt=wildcard --letsencrypt=off --letsencrypt=renew --letsencrypt=clean -le -le=off -le=wildcard --dns --dns=dns_cf --dns=dns_do" retlist="--wp --wpfc --wpsc --php73 --php73=off --wpredis --wprocket --wpce --letsencrypt --letsencrypt=subdomain --letsencrypt=wildcard --letsencrypt=off --letsencrypt=renew --letsencrypt=clean -le -le=off -le=wildcard --dns --dns=dns_cf --dns=dns_do"
else else
retlist="" retlist=""
fi fi
@@ -230,9 +230,9 @@ _wo_complete()
"--wpsubdir" | "--wpsubdomain") "--wpsubdir" | "--wpsubdomain")
if [ ${COMP_WORDS[1]} != "debug" ]; then if [ ${COMP_WORDS[1]} != "debug" ]; then
if [ ${COMP_WORDS[2]} == "create" ]; then if [ ${COMP_WORDS[2]} == "create" ]; then
retlist="--wpsc --wpfc --user --email --pass --wpredis --wprocket --letsencrypt --letsencrypt=subdomain --letsencrypt=wildcard -le --php73 --dns --dns=dns_cf --dns=dns_do" retlist="--wpsc --wpfc --user --email --pass --wpredis --wprocket --wpce --letsencrypt --letsencrypt=subdomain --letsencrypt=wildcard -le --php73 --dns --dns=dns_cf --dns=dns_do"
elif [ ${COMP_WORDS[2]} == "update" ]; then elif [ ${COMP_WORDS[2]} == "update" ]; then
retlist="--wpfc --wpsc --php73 --php73=off --wpredis --wprocket --letsencrypt --letsencrypt=subdomain --letsencrypt=wildcard --letsencrypt=off --letsencrypt=renew --letsencrypt=clean -le --dns --dns=dns_cf --dns=dns_do" retlist="--wpfc --wpsc --php73 --php73=off --wpredis --wprocket --wpce --letsencrypt --letsencrypt=subdomain --letsencrypt=wildcard --letsencrypt=off --letsencrypt=renew --letsencrypt=clean -le --dns --dns=dns_cf --dns=dns_do"
else else
retlist="" retlist=""
fi fi
@@ -246,9 +246,9 @@ _wo_complete()
-- $cur) ) -- $cur) )
;; ;;
"--wpredis --wprocket" | "--wpfc" | "--wpsc" | "--wpsubdir" | "--wpsubdomain" | "--user" | "--pass" | "--email" | "--wp") "--wpredis --wprocket --wpce" | "--wpfc" | "--wpsc" | "--wpsubdir" | "--wpsubdomain" | "--user" | "--pass" | "--email" | "--wp")
if [ ${COMP_WORDS[2]} == "create" ]; then if [ ${COMP_WORDS[2]} == "create" ]; then
retlist="--user --pass --email --wp --wpsubdir --wpsubdomain --wpfc --wpsc --wpredis --wprocket --php73 --letsencrypt --letsencrypt=subdomain --letsencrypt=wildcard -le --dns --dns=dns_cf --dns=dns_do" retlist="--user --pass --email --wp --wpsubdir --wpsubdomain --wpfc --wpsc --wpredis --wprocket --wpce --php73 --letsencrypt --letsencrypt=subdomain --letsencrypt=wildcard -le --dns --dns=dns_cf --dns=dns_do"
else else
retlist="" retlist=""
fi fi
@@ -259,9 +259,9 @@ _wo_complete()
-- $cur) ) -- $cur) )
;; ;;
"--wpredis --wprocket" | "--wpfc") "--wpredis --wprocket --wpce" | "--wpfc")
if [ ${COMP_WORDS[2]} == "update" ]; then if [ ${COMP_WORDS[2]} == "update" ]; then
retlist="--password --php --php73 --mysql --wp --wpsubdir --wpsubdomain --wpfc --wpsc --wpredis --wprocket --letsencrypt --letsencrypt=subdomain --letsencrypt=off --letsencrypt=renew --letsencrypt=clean -le --dns --dns=dns_cf --dns=dns_do" retlist="--password --php --php73 --mysql --wp --wpsubdir --wpsubdomain --wpfc --wpsc --wpredis --wprocket --wpce --letsencrypt --letsencrypt=subdomain --letsencrypt=off --letsencrypt=renew --letsencrypt=clean -le --dns --dns=dns_cf --dns=dns_do"
else else
retlist="" retlist=""
fi fi
@@ -314,7 +314,7 @@ _wo_complete()
elif [ ${COMP_WORDS[2]} == "delete" ]; then elif [ ${COMP_WORDS[2]} == "delete" ]; then
retlist="--db --files --force" retlist="--db --files --force"
elif [ ${COMP_WORDS[2]} == "update" ]; then elif [ ${COMP_WORDS[2]} == "update" ]; then
retlist="--password --php --mysql --wp --wpsubdir --wpsubdomain --wpfc --wpsc --wpredis --wprocket --letsencrypt --letsencrypt=subdomain --letsencrypt=off --letsencrypt=renew" retlist="--password --php --mysql --wp --wpsubdir --wpsubdomain --wpfc --wpsc --wpredis --wprocket --wpce --letsencrypt --letsencrypt=subdomain --letsencrypt=off --letsencrypt=renew"
else else
retlist="" retlist=""
fi fi
@@ -363,7 +363,7 @@ _wo_complete()
case "$mprev" in case "$mprev" in
"--user" | "--email" | "--pass") "--user" | "--email" | "--pass")
if [ ${COMP_WORDS[2]} == "create" ]; then if [ ${COMP_WORDS[2]} == "create" ]; then
retlist="--user --pass --email --html --php --php73 --mysql --wp --wpsubdir --wpsubdomain --wpfc --wpsc --wpredis --wprocket --letsencrypt --letsencrypt=subdomain --letsencrypt=wildcard -le --dns --dns=dns_cf --dns=dns_do" retlist="--user --pass --email --html --php --php73 --mysql --wp --wpsubdir --wpsubdomain --wpfc --wpsc --wpredis --wprocket --wpce --letsencrypt --letsencrypt=subdomain --letsencrypt=wildcard -le --dns --dns=dns_cf --dns=dns_do"
fi fi
ret="${retlist[@]/$prev}" ret="${retlist[@]/$prev}"
COMPREPLY=( $(compgen \ COMPREPLY=( $(compgen \

View File

@@ -8,7 +8,8 @@ from wo.core.domainvalidate import ValidateDomain
from wo.core.fileutils import WOFileUtils from wo.core.fileutils import WOFileUtils
from wo.cli.plugins.site_functions import * from wo.cli.plugins.site_functions import *
from wo.core.services import WOService from wo.core.services import WOService
from wo.cli.plugins.sitedb import * from wo.cli.plugins.sitedb import (addNewSite, getSiteInfo,
updateSiteInfo, deleteSiteInfo, getAllsites)
from wo.core.git import WOGit from wo.core.git import WOGit
from subprocess import Popen from subprocess import Popen
from wo.core.nginxhashbucket import hashbucket from wo.core.nginxhashbucket import hashbucket
@@ -1027,7 +1028,7 @@ class WOSiteUpdateController(CementBaseController):
data = dict(site_name=wo_domain, www_domain=wo_www_domain, data = dict(site_name=wo_domain, www_domain=wo_www_domain,
static=False, basic=True, wp=False, wpfc=False, static=False, basic=True, wp=False, wpfc=False,
wpsc=False, wpredis=False, wprocket=False, wpce=False, wpsc=False, wpredis=False, wprocket=False, wpce=False,
multisite=False,wpsubdir=False, webroot=wo_site_webroot, multisite=False, wpsubdir=False, webroot=wo_site_webroot,
wo_db_name='', wo_db_user='', wo_db_pass='', wo_db_name='', wo_db_user='', wo_db_pass='',
wo_db_host='', wo_db_host='',
currsitetype=oldsitetype, currcachetype=oldcachetype) currsitetype=oldsitetype, currcachetype=oldcachetype)

View File

@@ -8,15 +8,15 @@ import string
import subprocess import subprocess
from subprocess import CalledProcessError from subprocess import CalledProcessError
from wo.cli.plugins.sitedb import * from wo.cli.plugins.sitedb import getSiteInfo
from wo.cli.plugins.stack import WOStackController from wo.cli.plugins.stack import WOStackController
from wo.core.aptget import WOAptGet from wo.core.aptget import WOAptGet
from wo.core.fileutils import WOFileUtils from wo.core.fileutils import WOFileUtils
from wo.core.git import WOGit from wo.core.git import WOGit
from wo.core.logging import Log from wo.core.logging import Log
from wo.core.mysql import * from wo.core.mysql import WOMysql
from wo.core.services import WOService from wo.core.services import WOService
from wo.cli.plugins.stack_pref import pre_pref, post_pref from wo.cli.plugins.stack_pref import post_pref
from wo.core.shellexec import CommandExecutionError, WOShellExec from wo.core.shellexec import CommandExecutionError, WOShellExec
from wo.core.sslutils import SSL from wo.core.sslutils import SSL
from wo.core.variables import WOVariables from wo.core.variables import WOVariables

View File

@@ -800,7 +800,7 @@ def post_pref(self, apt_packages, packages):
encoding='utf-8', mode='w') as myfile: encoding='utf-8', mode='w') as myfile:
myfile.write("<?php\nphpinfo();\n?>") myfile.write("<?php\nphpinfo();\n?>")
WOFileUtils.chown(self, "{0}22222" WOFileUtils.chown(self, "{0}22222/htdocs"
.format(WOVariables.wo_webroot), .format(WOVariables.wo_webroot),
WOVariables.wo_php_user, WOVariables.wo_php_user,
WOVariables.wo_php_user, recursive=True) WOVariables.wo_php_user, recursive=True)
@@ -964,7 +964,7 @@ def post_pref(self, apt_packages, packages):
encoding='utf-8', mode='w') as myfile: encoding='utf-8', mode='w') as myfile:
myfile.write("<?php\nphpinfo();\n?>") myfile.write("<?php\nphpinfo();\n?>")
WOFileUtils.chown(self, "{0}22222" WOFileUtils.chown(self, "{0}22222/htdocs"
.format(WOVariables.wo_webroot), .format(WOVariables.wo_webroot),
WOVariables.wo_php_user, WOVariables.wo_php_user,
WOVariables.wo_php_user, recursive=True) WOVariables.wo_php_user, recursive=True)
@@ -1304,8 +1304,10 @@ def post_pref(self, apt_packages, packages):
"[\'Servers\'][$i][\'host\'] = \'{0}\';" "[\'Servers\'][$i][\'host\'] = \'{0}\';"
.format(WOVariables.wo_mysql_host)) .format(WOVariables.wo_mysql_host))
Log.debug(self, 'Setting Privileges of webroot permission to ' Log.debug(self, 'Setting Privileges of webroot permission to '
'{0}22222/htdocs/db/pma file '.format(WOVariables.wo_webroot)) '{0}22222/htdocs/db/pma file '
WOFileUtils.chown(self, '{0}22222'.format(WOVariables.wo_webroot), .format(WOVariables.wo_webroot))
WOFileUtils.chown(self, '{0}22222/htdocs'
.format(WOVariables.wo_webroot),
WOVariables.wo_php_user, WOVariables.wo_php_user,
WOVariables.wo_php_user, WOVariables.wo_php_user,
recursive=True) recursive=True)
@@ -1405,7 +1407,7 @@ def post_pref(self, apt_packages, packages):
Log.debug(self, "Setting Privileges to " Log.debug(self, "Setting Privileges to "
"{0}22222/htdocs" "{0}22222/htdocs"
.format(WOVariables.wo_webroot)) .format(WOVariables.wo_webroot))
WOFileUtils.chown(self, '{0}22222' WOFileUtils.chown(self, '{0}22222/htdocs'
.format(WOVariables.wo_webroot), .format(WOVariables.wo_webroot),
WOVariables.wo_php_user, WOVariables.wo_php_user,
WOVariables.wo_php_user, WOVariables.wo_php_user,
@@ -1428,7 +1430,7 @@ def post_pref(self, apt_packages, packages):
Log.debug(self, "Setting Privileges to " Log.debug(self, "Setting Privileges to "
"{0}22222/htdocs/files" "{0}22222/htdocs/files"
.format(WOVariables.wo_webroot)) .format(WOVariables.wo_webroot))
WOFileUtils.chown(self, '{0}22222' WOFileUtils.chown(self, '{0}22222/htdocs'
.format(WOVariables.wo_webroot), .format(WOVariables.wo_webroot),
WOVariables.wo_php_user, WOVariables.wo_php_user,
WOVariables.wo_php_user, WOVariables.wo_php_user,
@@ -1473,7 +1475,7 @@ def post_pref(self, apt_packages, packages):
Log.debug(self, "Setting Privileges of webroot permission to " Log.debug(self, "Setting Privileges of webroot permission to "
"{0}22222/htdocs/php/webgrind/ file " "{0}22222/htdocs/php/webgrind/ file "
.format(WOVariables.wo_webroot)) .format(WOVariables.wo_webroot))
WOFileUtils.chown(self, '{0}22222' WOFileUtils.chown(self, '{0}22222/htdocs'
.format(WOVariables.wo_webroot), .format(WOVariables.wo_webroot),
WOVariables.wo_php_user, WOVariables.wo_php_user,
WOVariables.wo_php_user, WOVariables.wo_php_user,
@@ -1550,7 +1552,7 @@ def post_pref(self, apt_packages, packages):
.format(WOVariables.wo_webroot)) .format(WOVariables.wo_webroot))
os.makedirs('{0}22222/htdocs/cache/redis/phpRedisAdmin' os.makedirs('{0}22222/htdocs/cache/redis/phpRedisAdmin'
.format(WOVariables.wo_webroot)) .format(WOVariables.wo_webroot))
WOFileUtils.chown(self, '{0}22222' WOFileUtils.chown(self, '{0}22222/htdocs'
.format(WOVariables.wo_webroot), .format(WOVariables.wo_webroot),
WOVariables.wo_php_user, WOVariables.wo_php_user,
WOVariables.wo_php_user, WOVariables.wo_php_user,
@@ -1565,7 +1567,7 @@ def post_pref(self, apt_packages, packages):
Log.debug(self, 'Setting Privileges of webroot permission to ' Log.debug(self, 'Setting Privileges of webroot permission to '
'{0}22222/htdocs/cache/file ' '{0}22222/htdocs/cache/file '
.format(WOVariables.wo_webroot)) .format(WOVariables.wo_webroot))
WOFileUtils.chown(self, '{0}22222' WOFileUtils.chown(self, '{0}22222/htdocs'
.format(WOVariables.wo_webroot), .format(WOVariables.wo_webroot),
WOVariables.wo_php_user, WOVariables.wo_php_user,
WOVariables.wo_php_user, WOVariables.wo_php_user,

View File

@@ -229,6 +229,10 @@ class WOStackUpgradeController(CementBaseController):
'wo-dashboard.tar.gz', 'wo-dashboard.tar.gz',
'{0}22222/htdocs' '{0}22222/htdocs'
.format(WOVariables.wo_webroot)) .format(WOVariables.wo_webroot))
WOFileUtils.chown(self, "{0}22222/htdocs"
.format(WOVariables.wo_webroot),
WOVariables.wo_php_user,
WOVariables.wo_php_user, recursive=True)
if pargs.composer: if pargs.composer:
Log.info(self, "Upgrading Composer, please wait...") Log.info(self, "Upgrading Composer, please wait...")
@@ -257,6 +261,10 @@ class WOStackUpgradeController(CementBaseController):
.format(WOVariables.wo_phpmyadmin), .format(WOVariables.wo_phpmyadmin),
'{0}22222/htdocs/db/pma/' '{0}22222/htdocs/db/pma/'
.format(WOVariables.wo_webroot)) .format(WOVariables.wo_webroot))
WOFileUtils.chown(self, "{0}22222/htdocs"
.format(WOVariables.wo_webroot),
WOVariables.wo_php_user,
WOVariables.wo_php_user, recursive=True)
Log.info(self, "Successfully updated packages") Log.info(self, "Successfully updated packages")
else: else: