Merge pull request #104 from WordOps/updating-configuration
Updating configuration
This commit is contained in:
@@ -33,7 +33,6 @@ script:
|
||||
- sudo apt-get install -qq --force-yes git python3-setuptools python3-dev python3-apt ccze tree
|
||||
- sudo bash install -b $TRAVIS_BRANCH --travis
|
||||
- sudo wo --help && sudo wo stack install && sudo wo stack install --proftpd
|
||||
- sudo wo stack upgrade --netdata --no-prompt
|
||||
- sudo wo site create html.net --html && sudo wo site create php.com --php && sudo wo site create mysql.com --mysql && sudo wo site create proxy.com --proxy=127.0.0.1:3000
|
||||
- sudo wo site create wp1.com --wp && sudo wo site create wpsc1.net --wpsc && sudo wo site create wpfc1.com --wpfc
|
||||
- sudo wo site create wpsc-php73.net --wpsc --php73 && sudo wo site create wpfc-php73.net --wpfc --php73
|
||||
@@ -49,5 +48,8 @@ script:
|
||||
- sudo wo info
|
||||
- sudo tree -L 2 /etc/nginx
|
||||
- sudo cat /var/www/wp1.com/wp-config.php
|
||||
- sudo wo stack upgrade --netdata --no-prompt
|
||||
- sudo wo stack upgrade --phpmyadmin --no-prompt
|
||||
- sudo wo stack upgrade --composer --no-prompt
|
||||
- sudo wo update --travis
|
||||
- sudo wo stack status
|
||||
10
CHANGELOG.md
10
CHANGELOG.md
@@ -8,12 +8,22 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
|
||||
### v3.9.x - [Unreleased]
|
||||
|
||||
### v3.9.6.2 - 2019-07-23
|
||||
|
||||
#### Fixed
|
||||
|
||||
- phpMyAdmin archive download link archive
|
||||
- Arguments `--letsencrypt=clean/purge`
|
||||
- Incorrect directory removal during stack upgrade
|
||||
|
||||
|
||||
### v3.9.6.1 - 2019-07-23
|
||||
|
||||
#### Fixed
|
||||
|
||||
- Typo in `--letsencrypt=subdomain`
|
||||
- phpMyAdmin upgrade archive extraction
|
||||
- Error in the command `wo update`. Please `wo update --beta` as workaround
|
||||
|
||||
### v3.9.6 - 2019-07-20
|
||||
|
||||
|
||||
@@ -165,7 +165,7 @@ _wo_complete()
|
||||
|
||||
"update")
|
||||
COMPREPLY=( $(compgen \
|
||||
-W "--password --php --php73 --mysql --wp --wpsubdir --wpsubdomain --wpfc --wpsc --wpredis --letsencrypt --letsencrypt=subdomain --letsencrypt=off --letsencrypt=renew -le -le=subdomain -le=wildcard --dns --dns=dns_cf --dns=dns_do" \
|
||||
-W "--password --php --php73 --mysql --wp --wpsubdir --wpsubdomain --wpfc --wpsc --wpredis --letsencrypt --letsencrypt=subdomain --letsencrypt=off --letsencrypt=renew --letsencrypt=clean -le -le=subdomain -le=wildcard --dns --dns=dns_cf --dns=dns_do" \
|
||||
-- $cur) )
|
||||
;;
|
||||
"delete")
|
||||
@@ -213,7 +213,7 @@ _wo_complete()
|
||||
if [ ${COMP_WORDS[2]} == "create" ]; then
|
||||
retlist="--wp --wpsc --wpfc --user --email --pass --wpredis --letsencrypt -le --letsencrypt=subdomain --letsencrypt=wildcard --dns --dns=dns_cf --dns=dns_do --php73"
|
||||
elif [ ${COMP_WORDS[2]} == "update" ]; then
|
||||
retlist="--wp --wpfc --wpsc --php73 --php73=off --wpredis --letsencrypt --letsencrypt=subdomain --letsencrypt=wildcard --letsencrypt=off --letsencrypt=renew -le -le=off -le=wildcard --dns --dns=dns_cf --dns=dns_do"
|
||||
retlist="--wp --wpfc --wpsc --php73 --php73=off --wpredis --letsencrypt --letsencrypt=subdomain --letsencrypt=wildcard --letsencrypt=off --letsencrypt=renew --letsencrypt=clean -le -le=off -le=wildcard --dns --dns=dns_cf --dns=dns_do"
|
||||
else
|
||||
retlist=""
|
||||
fi
|
||||
@@ -232,7 +232,7 @@ _wo_complete()
|
||||
if [ ${COMP_WORDS[2]} == "create" ]; then
|
||||
retlist="--wpsc --wpfc --user --email --pass --wpredis --letsencrypt --letsencrypt=subdomain --letsencrypt=wildcard -le --php73 --dns --dns=dns_cf --dns=dns_do"
|
||||
elif [ ${COMP_WORDS[2]} == "update" ]; then
|
||||
retlist="--wpfc --wpsc --php73 --php73=off --wpredis --letsencrypt --letsencrypt=subdomain --letsencrypt=wildcard --letsencrypt=off --letsencrypt=renew -le --dns --dns=dns_cf --dns=dns_do"
|
||||
retlist="--wpfc --wpsc --php73 --php73=off --wpredis --letsencrypt --letsencrypt=subdomain --letsencrypt=wildcard --letsencrypt=off --letsencrypt=renew --letsencrypt=clean -le --dns --dns=dns_cf --dns=dns_do"
|
||||
else
|
||||
retlist=""
|
||||
fi
|
||||
@@ -261,7 +261,7 @@ _wo_complete()
|
||||
|
||||
"--wpredis" | "--wpfc")
|
||||
if [ ${COMP_WORDS[2]} == "update" ]; then
|
||||
retlist="--password --php --php73 --mysql --wp --wpsubdir --wpsubdomain --wpfc --wpsc --wpredis --letsencrypt --letsencrypt=subdomain --letsencrypt=off --letsencrypt=renew -le --dns --dns=dns_cf --dns=dns_do"
|
||||
retlist="--password --php --php73 --mysql --wp --wpsubdir --wpsubdomain --wpfc --wpsc --wpredis --letsencrypt --letsencrypt=subdomain --letsencrypt=off --letsencrypt=renew --letsencrypt=clean -le --dns --dns=dns_cf --dns=dns_do"
|
||||
else
|
||||
retlist=""
|
||||
fi
|
||||
|
||||
628
docs/wo.8
628
docs/wo.8
@@ -1,314 +1,314 @@
|
||||
.TH wo 8 "WordOps (wo) version: 3.3.8" "Sep 10,2015" "WordOps"
|
||||
.SH NAME
|
||||
.B WordOps (wo)
|
||||
\- Manage Nginx Based Websites.
|
||||
.SH SYNOPSIS
|
||||
wo [ --version | --help | info | stack | site | debug | update | clean | import_slow_log | log | secure | sync | maintenance ]
|
||||
.TP
|
||||
wo stack [ install | remove | purge | migrate | upgrade] [ --web | --all | --nginx | --php | --php73 | --mysql | --admin | --adminer | --redis | --phpmyadmin | --phpredisadmin | --wpcli | --utils | --dashboard | --netdata ]
|
||||
.TP
|
||||
wo stack [ status | start | stop | reload | restart ] [--all | --nginx | --php | --php73 |--mysql | --web | --redis]
|
||||
.TP
|
||||
wo site [ list | info | show | enable | disable | edit | cd | show ] [ example.com ]
|
||||
.TP
|
||||
wo site create example.com [ --html | --php | --php73 | --mysql] [[--wp | --wpsubdir | --wpsubdomain ] [--wpsc | --wpfc | --wpredis | --letsencrypt/-le/--letsencrypt=subdomain/wildcard][--dns=dns_cf/dns_do]]
|
||||
.TP
|
||||
wo site update example.com [ --php | --php73 |--mysql] [[--wp | --wpsubdir | --wpsubdomain ] [--wpsc | --wpfc | --wpredis ] [--password] [-le/--letsencrypt=on/off/subdomain/renew/wildcard] [--dns=dns_cf/dns_do]]
|
||||
.TP
|
||||
wo site delete example.com [--db | --files | --all | --no-prompt | --force/-f ]
|
||||
.TP
|
||||
wo debug [ -i | --all=on/off |--nginx=on/off | --rewrite=on/off | --php=on/off | --fpm=on/off | --mysql=on/off ]
|
||||
.TP
|
||||
wo debug example.com [ -i | --all=on/off | --nginx=on/off | --rewrite=on/off | --wp=on/off ]
|
||||
.TP
|
||||
wo secure [ --auth | --port | --ip ]
|
||||
.SH DESCRIPTION
|
||||
WordOps aka wo is the opensource project developed with the purpose to automate web-server configuration.
|
||||
.br
|
||||
WordOps is the collection of python script that provides automation for the web-server
|
||||
.br
|
||||
installation, site creation, services debugging & monitoring.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B --version
|
||||
.br
|
||||
Display WordOps (wo) version information.
|
||||
.TP
|
||||
.B info
|
||||
.br
|
||||
wo info - Display Nginx, PHP, MySQL and wo common location information
|
||||
.br
|
||||
wo site info - Diplay given website details like enable, disable. weboot and log files.
|
||||
.TP
|
||||
.B --help
|
||||
.br
|
||||
Display WordOps (wo) help.
|
||||
.TP
|
||||
.B stack
|
||||
.TP
|
||||
.B install [ --all | --web | --nginx | --php | --php73 |--mysql | --redis | --adminer | --phpmyadmin | --phpredismyadmin | --wpcli | --utils | --netdata | --dashboard ]
|
||||
.br
|
||||
Install Nginx PHP5 MySQL Postfix stack Packages if not used with
|
||||
.br
|
||||
any options.Installs specific package if used with option.
|
||||
.TP
|
||||
.B remove [ --all | --web | --nginx | --php | --php73 |--mysql | --redis | --adminer | --phpmyadmin | --phpredismyadmin | --wpcli | --utils | --netdata | --dashboard ]
|
||||
.br
|
||||
Remove Nginx PHP5 MySQL Postfix stack Packages if not used with
|
||||
.br
|
||||
any options. Remove specific package if used with option.
|
||||
.TP
|
||||
.B purge [ --all | --web | --nginx | --php | --php73 |--mysql | --redis | --adminer | --phpmyadmin | --phpredismyadmin | --wpcli | --utils | --netdata | --dashboard ]
|
||||
.br
|
||||
Purge Nginx PHP5 MySQL Postfix stack Packages if not used with any
|
||||
.br
|
||||
options.Purge specific package if used with option.
|
||||
.TP
|
||||
.B status
|
||||
.br
|
||||
Display status of NGINX, PHP7.2-FPM, MySQL, Redis-Server services.
|
||||
.TP
|
||||
.B start
|
||||
.br
|
||||
Start services NGINX, PHP7.2-FPM, MySQL, Redis-Server.
|
||||
.TP
|
||||
.B stop
|
||||
.br
|
||||
Stop services NGINX, PHP7.2-FPM, MySQL, Redis-Server.
|
||||
.TP
|
||||
.B reload
|
||||
.br
|
||||
Reload services NGINX, PHP7.2-FPM, MySQL, Redis-Server.
|
||||
.TP
|
||||
.B restart
|
||||
.br
|
||||
Restart services NGINX, PHP7.2-FPM, MySQL, Redis-Server.
|
||||
.TP
|
||||
.B site
|
||||
.br
|
||||
.TP
|
||||
.B cd [ example.com ]
|
||||
.br
|
||||
Change directory to webroot of specified site in subshell.
|
||||
.TP
|
||||
.B log [ example.com ]
|
||||
.br
|
||||
monitor access and error logs for site specified.
|
||||
.TP
|
||||
.B list [ --enabled | --disabled ]
|
||||
.br
|
||||
Lists all available sites from /etc/nginx/sites-enabled/
|
||||
.br
|
||||
by default & enable argument. Display sites list from
|
||||
.br
|
||||
/etc/nginx/sites-available/ if used with available option.
|
||||
.TP
|
||||
.B info [ example.com ]
|
||||
.br
|
||||
prints information about site such as access log, error log
|
||||
.br
|
||||
location and type of site.
|
||||
.TP
|
||||
.B show [ example.com ]
|
||||
.br
|
||||
Display NGINX configuration of site.
|
||||
.TP
|
||||
.B enable [ example.com ]
|
||||
.br
|
||||
Enable site by creating softlink with site file in
|
||||
.br
|
||||
/etc/nginx/sites-available to /etc/nginx/sites-enabled/.
|
||||
.TP
|
||||
.B disable [ example.com ]
|
||||
.br
|
||||
Disable site by Destroying softlink with site file in
|
||||
.br
|
||||
/etc/nginx/sites-available to /etc/nginx/sites-enabled/.
|
||||
.TP
|
||||
.B edit [ example.com ]
|
||||
.br
|
||||
Edit NGINX configuration of site.
|
||||
.TP
|
||||
.B create [ example.com ] [ --html | --php | --php73 |--mysql] [[--wp | --wpsubdir | --wpsubdomain ] [--wpsc | --wpfc | --wpredis ]]
|
||||
.br
|
||||
Create new site according to given options. If no options provided
|
||||
.br
|
||||
create static site with html only.
|
||||
.TP
|
||||
.B update [ example.com ] [ --html | --php | --php73 |--mysql] [[--wp | --wpsubdir | --wpsubdomain ] [ --wpsc | --wpfc | --wpredis ] [--password]]
|
||||
.br
|
||||
Update site configuration according to specified options.
|
||||
.TP
|
||||
.B delete [ example.com ] [--no-prompt ] [--force/-f] [ --db | --files | --all ]
|
||||
.br
|
||||
Delete site i.e webroot, database, ad configuration permanently.
|
||||
.TP
|
||||
.B debug [ -i | --nginx=on/off | --php=on/off | --php73=on/off | --mysql=on/off | --rewrite=on/off | --fpm=on/off | --fpm7=on/off ]
|
||||
.br
|
||||
Starts server level debugging. If this is used without arguments it will start debugging
|
||||
.br
|
||||
all services.Else it will debug only service provided with argument.This will Stop
|
||||
.br
|
||||
Debugging if used with --all=off argument.
|
||||
.TP
|
||||
.B debug example.com [ -i | --nginx=on/off | --rewrite=on/off | --wp=on/off | --all=on/off ]
|
||||
.br
|
||||
Starts site level debugging. If this is used without arguments it will start debugging all
|
||||
.br
|
||||
services.Else it will debug only service provided with argument.This will Stop Debugging
|
||||
.br
|
||||
if used with --all=off argument.
|
||||
.TP
|
||||
.B secure [ --auth | --port | --ip ]
|
||||
.br
|
||||
Update security settings.
|
||||
.TP
|
||||
.B clean [ --fastcgi | --opcache | --redis | --all ]
|
||||
.br
|
||||
Clean NGINX fastCGI cache, Opcache, memcached, Redis cache.
|
||||
.br
|
||||
Clean NGINX fastCGI cache if no option specified.
|
||||
.SH ARGUMENTS
|
||||
.TP
|
||||
.B -i
|
||||
.br
|
||||
setup intractive mode while used with debug.
|
||||
.TP
|
||||
.B --nginx=on/off
|
||||
.br
|
||||
used with wo debug command. used to start or stop nginx debugging.
|
||||
.TP
|
||||
.B --php=on/off
|
||||
.br
|
||||
used with wo debug command. used to start or stop php debugging.
|
||||
.TP
|
||||
.B --php73=on/off
|
||||
.br
|
||||
used with wo debug command. used to start or stop php72 debugging.
|
||||
.TP
|
||||
.B --mysql=on/off
|
||||
.br
|
||||
used with wo debug command. used to start or stop mysql debugging.
|
||||
.TP
|
||||
.B --rewrite=on/off
|
||||
.br
|
||||
used with wo debug command. used to start or stop nginx rewrite rules debugging.
|
||||
.TP
|
||||
.B --fpm=on/off
|
||||
.br
|
||||
used with wo debug command. used to start or stop fpm debugging.
|
||||
.TP
|
||||
.B --wp=on/off
|
||||
.br
|
||||
used with wo debug command. used to start or stop wordpress site debugging.
|
||||
.TP
|
||||
.B --all=on/off
|
||||
.br
|
||||
used with wo debug command. used to stop debugging.
|
||||
.TP
|
||||
.B --all=off
|
||||
.br
|
||||
used with wo debug command. used to stop debugging.
|
||||
.TP
|
||||
.B --html
|
||||
.br
|
||||
Create a HTML website.
|
||||
.TP
|
||||
.B --php
|
||||
.br
|
||||
Create a PHP website.
|
||||
.TP
|
||||
.B --mysql
|
||||
.br
|
||||
Create a PHP+MySQL website.
|
||||
.TP
|
||||
.B --wp
|
||||
.br
|
||||
Create a WordPress Website.
|
||||
.TP
|
||||
.B --wpsubdir
|
||||
.br
|
||||
Create a Wordpress Multisite with Sub Directories Setup.
|
||||
.TP
|
||||
.B --wpsubdomain
|
||||
.br
|
||||
Create a Wordpress Multisite with Sub Domains Setup.
|
||||
.br
|
||||
.TP
|
||||
.B --db
|
||||
.br
|
||||
Delete website database.
|
||||
.br
|
||||
.TP
|
||||
.B --files
|
||||
.br
|
||||
Delete website webroot.
|
||||
.br
|
||||
.TP
|
||||
.B --no-prompt
|
||||
.br
|
||||
Does not prompt for confirmation when delete command used.
|
||||
.br
|
||||
.TP
|
||||
.B --force/-f
|
||||
.br
|
||||
Delete website webroot and database forcefully.Remove nginx configuration for site.
|
||||
.br
|
||||
.TP
|
||||
.B --auth
|
||||
.br
|
||||
used with wo secure command. Update credential of HTTP authentication
|
||||
.TP
|
||||
.B --port
|
||||
.br
|
||||
used with wo secure command. Change WordOps admin port 22222.
|
||||
.TP
|
||||
.B --ip
|
||||
.br
|
||||
used with wo secure command. Update whitelist IP address
|
||||
.SH WORDPRESS CACHING OPTIONS
|
||||
.TP
|
||||
.B --wpsc
|
||||
.br
|
||||
Install and activate Nginx-helper and WP Super Cache plugin.
|
||||
.TP
|
||||
.B --wpfc
|
||||
.br
|
||||
Install and activate Nginx-helper plugin with
|
||||
.br
|
||||
Nginx FastCGI cache.
|
||||
.TP
|
||||
.B --wpredis
|
||||
.br
|
||||
Install, activate, configure Nginx-helper and Redis Object Cache Plugin, Configure NGINX for Redis Page Caching.
|
||||
.SH FILES
|
||||
.br
|
||||
/etc/wo/wo.conf
|
||||
.SH BUGS
|
||||
Report bugs at <http://github.com/WordOps/WordOps/issues/>
|
||||
.SH AUTHOR
|
||||
.br
|
||||
.B rtCamp Team
|
||||
.I \<admin@rtcamp.com\>
|
||||
.br
|
||||
.B Mitesh Shah
|
||||
.I \<Mitesh.Shah@rtcamp.com\>
|
||||
.br
|
||||
.B Manish
|
||||
.I \<Manish.Songirkar@rtcamp.com\>
|
||||
.br
|
||||
.B Gaurav
|
||||
.I \<Gaurav.Astikar@rtcamp.com\>
|
||||
.br
|
||||
.B Harshad
|
||||
.I \<harshad.yeola@rtcamp.com>
|
||||
.br
|
||||
.B Prabuddha
|
||||
.I \<prabuddha.chakraborty@rtcamp.com\>
|
||||
.br
|
||||
.B Shital
|
||||
.I \<shital.patil@rtcamp.com\>
|
||||
.br
|
||||
.B Rajdeep Sharma
|
||||
.I \<rajdeep.sharma@rtcamp.com\>
|
||||
.br
|
||||
.TH wo 8 "WordOps (wo) version: 3.3.8" "Sep 10,2015" "WordOps"
|
||||
.SH NAME
|
||||
.B WordOps (wo)
|
||||
\- Manage Nginx Based Websites.
|
||||
.SH SYNOPSIS
|
||||
wo [ --version | --help | info | stack | site | debug | update | clean | import_slow_log | log | secure | sync | maintenance ]
|
||||
.TP
|
||||
wo stack [ install | remove | purge | migrate | upgrade] [ --web | --all | --nginx | --php | --php73 | --mysql | --admin | --adminer | --redis | --phpmyadmin | --phpredisadmin | --wpcli | --utils | --dashboard | --netdata ]
|
||||
.TP
|
||||
wo stack [ status | start | stop | reload | restart ] [--all | --nginx | --php | --php73 |--mysql | --web | --redis]
|
||||
.TP
|
||||
wo site [ list | info | show | enable | disable | edit | cd | show ] [ example.com ]
|
||||
.TP
|
||||
wo site create example.com [ --html | --php | --php73 | --mysql] [[--wp | --wpsubdir | --wpsubdomain ] [--wpsc | --wpfc | --wpredis | --letsencrypt/-le/--letsencrypt=subdomain/wildcard][--dns=dns_cf/dns_do]]
|
||||
.TP
|
||||
wo site update example.com [ --php | --php73 |--mysql] [[--wp | --wpsubdir | --wpsubdomain ] [--wpsc | --wpfc | --wpredis ] [--password] [-le/--letsencrypt=on/off/subdomain/renew/wildcard] [--dns=dns_cf/dns_do]]
|
||||
.TP
|
||||
wo site delete example.com [--db | --files | --all | --no-prompt | --force/-f ]
|
||||
.TP
|
||||
wo debug [ -i | --all=on/off |--nginx=on/off | --rewrite=on/off | --php=on/off | --fpm=on/off | --mysql=on/off ]
|
||||
.TP
|
||||
wo debug example.com [ -i | --all=on/off | --nginx=on/off | --rewrite=on/off | --wp=on/off ]
|
||||
.TP
|
||||
wo secure [ --auth | --port | --ip ]
|
||||
.SH DESCRIPTION
|
||||
WordOps aka wo is the opensource project developed with the purpose to automate web-server configuration.
|
||||
.br
|
||||
WordOps is the collection of python script that provides automation for the web-server
|
||||
.br
|
||||
installation, site creation, services debugging & monitoring.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B --version
|
||||
.br
|
||||
Display WordOps (wo) version information.
|
||||
.TP
|
||||
.B info
|
||||
.br
|
||||
wo info - Display Nginx, PHP, MySQL and wo common location information
|
||||
.br
|
||||
wo site info - Diplay given website details like enable, disable. weboot and log files.
|
||||
.TP
|
||||
.B --help
|
||||
.br
|
||||
Display WordOps (wo) help.
|
||||
.TP
|
||||
.B stack
|
||||
.TP
|
||||
.B install [ --all | --web | --nginx | --php | --php73 |--mysql | --redis | --adminer | --phpmyadmin | --phpredismyadmin | --wpcli | --utils | --netdata | --dashboard ]
|
||||
.br
|
||||
Install Nginx PHP5 MySQL Postfix stack Packages if not used with
|
||||
.br
|
||||
any options.Installs specific package if used with option.
|
||||
.TP
|
||||
.B remove [ --all | --web | --nginx | --php | --php73 |--mysql | --redis | --adminer | --phpmyadmin | --phpredismyadmin | --wpcli | --utils | --netdata | --dashboard ]
|
||||
.br
|
||||
Remove Nginx PHP5 MySQL Postfix stack Packages if not used with
|
||||
.br
|
||||
any options. Remove specific package if used with option.
|
||||
.TP
|
||||
.B purge [ --all | --web | --nginx | --php | --php73 |--mysql | --redis | --adminer | --phpmyadmin | --phpredismyadmin | --wpcli | --utils | --netdata | --dashboard ]
|
||||
.br
|
||||
Purge Nginx PHP5 MySQL Postfix stack Packages if not used with any
|
||||
.br
|
||||
options.Purge specific package if used with option.
|
||||
.TP
|
||||
.B status
|
||||
.br
|
||||
Display status of NGINX, PHP7.2-FPM, MySQL, Redis-Server services.
|
||||
.TP
|
||||
.B start
|
||||
.br
|
||||
Start services NGINX, PHP7.2-FPM, MySQL, Redis-Server.
|
||||
.TP
|
||||
.B stop
|
||||
.br
|
||||
Stop services NGINX, PHP7.2-FPM, MySQL, Redis-Server.
|
||||
.TP
|
||||
.B reload
|
||||
.br
|
||||
Reload services NGINX, PHP7.2-FPM, MySQL, Redis-Server.
|
||||
.TP
|
||||
.B restart
|
||||
.br
|
||||
Restart services NGINX, PHP7.2-FPM, MySQL, Redis-Server.
|
||||
.TP
|
||||
.B site
|
||||
.br
|
||||
.TP
|
||||
.B cd [ example.com ]
|
||||
.br
|
||||
Change directory to webroot of specified site in subshell.
|
||||
.TP
|
||||
.B log [ example.com ]
|
||||
.br
|
||||
monitor access and error logs for site specified.
|
||||
.TP
|
||||
.B list [ --enabled | --disabled ]
|
||||
.br
|
||||
Lists all available sites from /etc/nginx/sites-enabled/
|
||||
.br
|
||||
by default & enable argument. Display sites list from
|
||||
.br
|
||||
/etc/nginx/sites-available/ if used with available option.
|
||||
.TP
|
||||
.B info [ example.com ]
|
||||
.br
|
||||
prints information about site such as access log, error log
|
||||
.br
|
||||
location and type of site.
|
||||
.TP
|
||||
.B show [ example.com ]
|
||||
.br
|
||||
Display NGINX configuration of site.
|
||||
.TP
|
||||
.B enable [ example.com ]
|
||||
.br
|
||||
Enable site by creating softlink with site file in
|
||||
.br
|
||||
/etc/nginx/sites-available to /etc/nginx/sites-enabled/.
|
||||
.TP
|
||||
.B disable [ example.com ]
|
||||
.br
|
||||
Disable site by Destroying softlink with site file in
|
||||
.br
|
||||
/etc/nginx/sites-available to /etc/nginx/sites-enabled/.
|
||||
.TP
|
||||
.B edit [ example.com ]
|
||||
.br
|
||||
Edit NGINX configuration of site.
|
||||
.TP
|
||||
.B create [ example.com ] [ --html | --php | --php73 |--mysql] [[--wp | --wpsubdir | --wpsubdomain ] [--wpsc | --wpfc | --wpredis ]]
|
||||
.br
|
||||
Create new site according to given options. If no options provided
|
||||
.br
|
||||
create static site with html only.
|
||||
.TP
|
||||
.B update [ example.com ] [ --html | --php | --php73 |--mysql] [[--wp | --wpsubdir | --wpsubdomain ] [ --wpsc | --wpfc | --wpredis ] [--password]]
|
||||
.br
|
||||
Update site configuration according to specified options.
|
||||
.TP
|
||||
.B delete [ example.com ] [--no-prompt ] [--force/-f] [ --db | --files | --all ]
|
||||
.br
|
||||
Delete site i.e webroot, database, ad configuration permanently.
|
||||
.TP
|
||||
.B debug [ -i | --nginx=on/off | --php=on/off | --php73=on/off | --mysql=on/off | --rewrite=on/off | --fpm=on/off | --fpm7=on/off ]
|
||||
.br
|
||||
Starts server level debugging. If this is used without arguments it will start debugging
|
||||
.br
|
||||
all services.Else it will debug only service provided with argument.This will Stop
|
||||
.br
|
||||
Debugging if used with --all=off argument.
|
||||
.TP
|
||||
.B debug example.com [ -i | --nginx=on/off | --rewrite=on/off | --wp=on/off | --all=on/off ]
|
||||
.br
|
||||
Starts site level debugging. If this is used without arguments it will start debugging all
|
||||
.br
|
||||
services.Else it will debug only service provided with argument.This will Stop Debugging
|
||||
.br
|
||||
if used with --all=off argument.
|
||||
.TP
|
||||
.B secure [ --auth | --port | --ip ]
|
||||
.br
|
||||
Update security settings.
|
||||
.TP
|
||||
.B clean [ --fastcgi | --opcache | --redis | --all ]
|
||||
.br
|
||||
Clean NGINX fastCGI cache, Opcache, memcached, Redis cache.
|
||||
.br
|
||||
Clean NGINX fastCGI cache if no option specified.
|
||||
.SH ARGUMENTS
|
||||
.TP
|
||||
.B -i
|
||||
.br
|
||||
setup intractive mode while used with debug.
|
||||
.TP
|
||||
.B --nginx=on/off
|
||||
.br
|
||||
used with wo debug command. used to start or stop nginx debugging.
|
||||
.TP
|
||||
.B --php=on/off
|
||||
.br
|
||||
used with wo debug command. used to start or stop php debugging.
|
||||
.TP
|
||||
.B --php73=on/off
|
||||
.br
|
||||
used with wo debug command. used to start or stop php72 debugging.
|
||||
.TP
|
||||
.B --mysql=on/off
|
||||
.br
|
||||
used with wo debug command. used to start or stop mysql debugging.
|
||||
.TP
|
||||
.B --rewrite=on/off
|
||||
.br
|
||||
used with wo debug command. used to start or stop nginx rewrite rules debugging.
|
||||
.TP
|
||||
.B --fpm=on/off
|
||||
.br
|
||||
used with wo debug command. used to start or stop fpm debugging.
|
||||
.TP
|
||||
.B --wp=on/off
|
||||
.br
|
||||
used with wo debug command. used to start or stop wordpress site debugging.
|
||||
.TP
|
||||
.B --all=on/off
|
||||
.br
|
||||
used with wo debug command. used to stop debugging.
|
||||
.TP
|
||||
.B --all=off
|
||||
.br
|
||||
used with wo debug command. used to stop debugging.
|
||||
.TP
|
||||
.B --html
|
||||
.br
|
||||
Create a HTML website.
|
||||
.TP
|
||||
.B --php
|
||||
.br
|
||||
Create a PHP website.
|
||||
.TP
|
||||
.B --mysql
|
||||
.br
|
||||
Create a PHP+MySQL website.
|
||||
.TP
|
||||
.B --wp
|
||||
.br
|
||||
Create a WordPress Website.
|
||||
.TP
|
||||
.B --wpsubdir
|
||||
.br
|
||||
Create a Wordpress Multisite with Sub Directories Setup.
|
||||
.TP
|
||||
.B --wpsubdomain
|
||||
.br
|
||||
Create a Wordpress Multisite with Sub Domains Setup.
|
||||
.br
|
||||
.TP
|
||||
.B --db
|
||||
.br
|
||||
Delete website database.
|
||||
.br
|
||||
.TP
|
||||
.B --files
|
||||
.br
|
||||
Delete website webroot.
|
||||
.br
|
||||
.TP
|
||||
.B --no-prompt
|
||||
.br
|
||||
Does not prompt for confirmation when delete command used.
|
||||
.br
|
||||
.TP
|
||||
.B --force/-f
|
||||
.br
|
||||
Delete website webroot and database forcefully.Remove nginx configuration for site.
|
||||
.br
|
||||
.TP
|
||||
.B --auth
|
||||
.br
|
||||
used with wo secure command. Update credential of HTTP authentication
|
||||
.TP
|
||||
.B --port
|
||||
.br
|
||||
used with wo secure command. Change WordOps admin port 22222.
|
||||
.TP
|
||||
.B --ip
|
||||
.br
|
||||
used with wo secure command. Update whitelist IP address
|
||||
.SH WORDPRESS CACHING OPTIONS
|
||||
.TP
|
||||
.B --wpsc
|
||||
.br
|
||||
Install and activate Nginx-helper and WP Super Cache plugin.
|
||||
.TP
|
||||
.B --wpfc
|
||||
.br
|
||||
Install and activate Nginx-helper plugin with
|
||||
.br
|
||||
Nginx FastCGI cache.
|
||||
.TP
|
||||
.B --wpredis
|
||||
.br
|
||||
Install, activate, configure Nginx-helper and Redis Object Cache Plugin, Configure NGINX for Redis Page Caching.
|
||||
.SH FILES
|
||||
.br
|
||||
/etc/wo/wo.conf
|
||||
.SH BUGS
|
||||
Report bugs at <http://github.com/WordOps/WordOps/issues/>
|
||||
.SH AUTHOR
|
||||
.br
|
||||
.B rtCamp Team
|
||||
.I \<admin@rtcamp.com\>
|
||||
.br
|
||||
.B Mitesh Shah
|
||||
.I \<Mitesh.Shah@rtcamp.com\>
|
||||
.br
|
||||
.B Manish
|
||||
.I \<Manish.Songirkar@rtcamp.com\>
|
||||
.br
|
||||
.B Gaurav
|
||||
.I \<Gaurav.Astikar@rtcamp.com\>
|
||||
.br
|
||||
.B Harshad
|
||||
.I \<harshad.yeola@rtcamp.com>
|
||||
.br
|
||||
.B Prabuddha
|
||||
.I \<prabuddha.chakraborty@rtcamp.com\>
|
||||
.br
|
||||
.B Shital
|
||||
.I \<shital.patil@rtcamp.com\>
|
||||
.br
|
||||
.B Rajdeep Sharma
|
||||
.I \<rajdeep.sharma@rtcamp.com\>
|
||||
.br
|
||||
|
||||
42
install
42
install
@@ -7,10 +7,10 @@
|
||||
# Copyright (c) 2019 - WordOps
|
||||
# This script is licensed under M.I.T
|
||||
# -------------------------------------------------------------------------
|
||||
# Version 3.9.6 - 2019-07-20
|
||||
# Version 3.9.6 - 2019-07-24
|
||||
# -------------------------------------------------------------------------
|
||||
readonly wo_version_old="2.2.3"
|
||||
readonly wo_version_new="3.9.6.1"
|
||||
readonly wo_version_new="3.9.6.2"
|
||||
# CONTENTS
|
||||
# ---
|
||||
# 1. VARIABLES AND DECLARATIONS
|
||||
@@ -175,19 +175,20 @@ wo_install_dep() {
|
||||
|
||||
[ -z "$wo_travis" ] && {
|
||||
# update server packages
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confmiss" -o Dpkg::Options::="--force-confold" -y dist-upgrade
|
||||
} > /dev/null 2>&1
|
||||
DEBIAN_FRONTEND=noninteractive apt-get dist-upgrade --option=Dpkg::options::=--force-confmiss --option=Dpkg::options::=--force-confold --option=Dpkg::options::=--force-unsafe-io --assume-yes --quiet
|
||||
}
|
||||
if [ "$wo_linux_distro" == "Ubuntu" ]; then
|
||||
# install dependencies
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confmiss" -o Dpkg::Options::="--force-confold" -y install build-essential curl gzip python3 python3-apt python3-setuptools python3-dev sqlite3 git tar software-properties-common pigz gnupg2 cron ccze rsync tree haveged ufw > /dev/null 2>&1
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confmiss" -o Dpkg::Options::="--force-confold" --assume-yes install build-essential curl gzip python3 python3-apt python3-setuptools python3-dev sqlite3 git tar software-properties-common pigz gnupg2 cron ccze rsync tree haveged ufw > /dev/null 2>&1
|
||||
else
|
||||
# install dependencies
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confmiss" -o Dpkg::Options::="--force-confold" --assume-yes install build-essential curl gzip dirmngr sudo python3 python3-apt python3-setuptools python3-dev ca-certificates sqlite3 git tar software-properties-common pigz apt-transport-https gnupg2 cron ccze rsync tree haveged ufw > /dev/null 2>&1
|
||||
# add php repository gpg key
|
||||
[ -d /etc/apt/trusted.gpg.d ] && { wget -qO /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg; }
|
||||
# add nginx repository gpg key
|
||||
wget https://download.opensuse.org/repositories/home:virtubox:WordOps/Debian_9.0/Release.key -O Release.key
|
||||
apt-key add - < Release.key
|
||||
rm -f Release.key
|
||||
# install dependencies
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confmiss" -o Dpkg::Options::="--force-confold" -y install build-essential curl gzip dirmngr sudo python3 python3-apt python3-setuptools python3-dev ca-certificates sqlite3 git tar software-properties-common pigz apt-transport-https gnupg2 cron ccze rsync tree haveged ufw > /dev/null 2>&1
|
||||
[ -d /etc/apt/trusted.gpg.d ] && { wget -qO /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg; }
|
||||
fi
|
||||
|
||||
locale-gen en
|
||||
@@ -405,18 +406,21 @@ wo_install() {
|
||||
{
|
||||
rm -f /etc/bash_completion.d/wo_auto.rc
|
||||
rm -rf /tmp/WordOps
|
||||
git clone https://github.com/WordOps/WordOps.git /tmp/WordOps -b "$wo_branch"
|
||||
git clone -b "$wo_branch" --depth=50 https://github.com/WordOps/WordOps.git /tmp/WordOps
|
||||
cd /tmp/WordOps || exit 1
|
||||
|
||||
} \
|
||||
>> "$wo_install_log" 2>&1
|
||||
|
||||
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 >> $wo_install_log 2>&1
|
||||
else
|
||||
if [ "$wo_force_install" = "y" ]; then
|
||||
[ ! -f "$HOME/.gitconfig" ] && { bash -c 'echo -e "[user]\n\tname = $USER\n\temail = root@$HOSTNAME" > $HOME/.gitconfig'; }
|
||||
fi
|
||||
# install without redirecting logs to prompt user for name & email
|
||||
python3 setup.py install
|
||||
fi
|
||||
|
||||
@@ -444,17 +448,16 @@ wo_upgrade_nginx() {
|
||||
|
||||
# add new Nginx repository
|
||||
if [ "$wo_linux_distro" = "Ubuntu" ]; then
|
||||
if [ ! -f /etc/apt/sources.list.d/wordops-ubuntu-nginx-wo-"$(lsb_release -sc)".list ]; then
|
||||
add-apt-repository ppa:wordops/nginx-wo -y -u
|
||||
fi
|
||||
else
|
||||
if [ "$wo_distro_version" == "jessie" ]; then
|
||||
wget -qO /tmp/nginx-wo.key https://download.opensuse.org/repositories/home:virtubox:WordOps/Debian_8.0/Release.key
|
||||
curl -sL https://download.opensuse.org/repositories/home:virtubox:WordOps/Debian_8.0/Release.key | apt-key add -
|
||||
else
|
||||
wget -qO /tmp/nginx-wo.key https://download.opensuse.org/repositories/home:virtubox:WordOps/Debian_9.0/Release.key
|
||||
curl -sL https://download.opensuse.org/repositories/home:virtubox:WordOps/Debian_9.0/Release.key | apt-key add -
|
||||
fi
|
||||
# import the respository key for updates
|
||||
apt-key add - < /tmp/nginx-wo.key
|
||||
rm -f /tmp/nginx-wo.key
|
||||
apt-get update -qq
|
||||
fi
|
||||
|
||||
# stop nginx
|
||||
@@ -487,7 +490,7 @@ wo_upgrade_nginx() {
|
||||
fi
|
||||
|
||||
/usr/local/bin/wo stack install --nginx --php
|
||||
rm -f /etc/nginx/common/acl.conf /etc/nginx/conf.d/{map-wp-cache.conf,map-wp.conf,fascgi.conf} /etc/nginx/htpasswd-wo
|
||||
rm -f /etc/nginx/common/acl.conf /etc/nginx/conf.d/{map-wp-cache.conf,map-wp.conf,fascgi.conf,blockips.conf} /etc/nginx/htpasswd-wo
|
||||
fi
|
||||
|
||||
# restore sites and configuration
|
||||
@@ -637,7 +640,7 @@ wo_tweak_kernel() {
|
||||
if [ ! -f /etc/sysctl.d/60-wo-tweaks.conf ]; then
|
||||
if [ "$WO_ARCH" = "x86_64" ]; then
|
||||
rm -f /etc/sysctl.d/60-ubuntu-nginx-web-server.conf
|
||||
wget -qO /etc/sysctl.d/60-wo-tweaks.conf https://raw.githubusercontent.com/WordOps/WordOps/updating-configuration/wo/cli/templates/sysctl.mustache
|
||||
wget -qO /etc/sysctl.d/60-wo-tweaks.conf https://raw.githubusercontent.com/WordOps/WordOps/master/wo/cli/templates/sysctl.mustache
|
||||
if [ "$wo_distro_version" = "bionic" ] || [ "$wo_distro_version" = "disco" ] || [ "$wo_distro_version" = "buster" ]; then
|
||||
modprobe tcp_bbr && echo 'tcp_bbr' >> /etc/modules-load.d/bbr.conf
|
||||
echo -e '\nnet.ipv4.tcp_congestion_control = bbr\nnet.ipv4.tcp_notsent_lowat = 16384' >> /etc/sysctl.d/60-wo-tweaks.conf
|
||||
@@ -774,6 +777,7 @@ elif [ "$wo_upgrade" = "1" ]; then
|
||||
else
|
||||
wo_lib_echo "WordOps (wo) installed successfully"
|
||||
fi
|
||||
echo
|
||||
wo_lib_echo_info "For autocompletion, run the following command:"
|
||||
wo_lib_echo_info "source /etc/bash_completion.d/wo_auto.rc"
|
||||
echo
|
||||
|
||||
2
setup.py
2
setup.py
@@ -57,7 +57,7 @@ if not os.path.isfile('/root/.gitconfig'):
|
||||
shutil.copy2(os.path.expanduser("~")+'/.gitconfig', '/root/.gitconfig')
|
||||
|
||||
setup(name='wo',
|
||||
version='3.9.6.1',
|
||||
version='3.9.6.2',
|
||||
description=long_description,
|
||||
long_description=long_description,
|
||||
classifiers=[],
|
||||
|
||||
@@ -15,7 +15,7 @@ class CliTestCaseStack(test.WOTestCase):
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_services_start_php5_fpm(self):
|
||||
def test_wo_cli_stack_services_start_php_fpm(self):
|
||||
self.app = get_test_app(argv=['stack', 'start', '--php'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
@@ -27,12 +27,6 @@ class CliTestCaseStack(test.WOTestCase):
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_services_start_memcached(self):
|
||||
self.app = get_test_app(argv=['stack', 'start', '--memcache'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_services_start_all(self):
|
||||
self.app = get_test_app(argv=['stack', 'start'])
|
||||
self.app.setup()
|
||||
|
||||
@@ -15,7 +15,7 @@ class CliTestCaseStack(test.WOTestCase):
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_services_status_php5_fpm(self):
|
||||
def test_wo_cli_stack_services_status_php_fpm(self):
|
||||
self.app = get_test_app(argv=['stack', 'status', '--php'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
|
||||
@@ -15,7 +15,7 @@ class CliTestCaseStack(test.WOTestCase):
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_services_stop_php5_fpm(self):
|
||||
def test_wo_cli_stack_services_stop_php_fpm(self):
|
||||
self.app = get_test_app(argv=['stack', 'stop', '--php'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
@@ -27,12 +27,6 @@ class CliTestCaseStack(test.WOTestCase):
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_services_stop_memcached(self):
|
||||
self.app = get_test_app(argv=['stack', 'stop', '--memcache'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_services_stop_all(self):
|
||||
self.app = get_test_app(argv=['stack', 'stop'])
|
||||
self.app.setup()
|
||||
|
||||
@@ -15,7 +15,7 @@ class CliTestCaseStack(test.WOTestCase):
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_services_restart_php5_fpm(self):
|
||||
def test_wo_cli_stack_services_restart_php_fpm(self):
|
||||
self.app = get_test_app(argv=['stack', 'restart', '--php'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
@@ -27,12 +27,6 @@ class CliTestCaseStack(test.WOTestCase):
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_services_restart_memcached(self):
|
||||
self.app = get_test_app(argv=['stack', 'restart', '--memcache'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_stack_services_restart_all(self):
|
||||
self.app = get_test_app(argv=['stack', 'restart'])
|
||||
self.app.setup()
|
||||
|
||||
@@ -27,12 +27,6 @@ class CliTestCaseClean(test.WOTestCase):
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_clean_memcache(self):
|
||||
self.app = get_test_app(argv=['clean', '--memcache'])
|
||||
self.app.setup()
|
||||
self.app.run()
|
||||
self.app.close()
|
||||
|
||||
def test_wo_cli_clean_opcache(self):
|
||||
self.app = get_test_app(argv=['clean', '--opcache'])
|
||||
self.app.setup()
|
||||
|
||||
@@ -820,7 +820,7 @@ class WOSiteUpdateController(CementBaseController):
|
||||
dict(help="configure letsencrypt ssl for the site",
|
||||
action='store' or 'store_const',
|
||||
choices=('on', 'off', 'renew', 'subdomain',
|
||||
'wildcard', 'clean'),
|
||||
'wildcard', 'clean', 'purge'),
|
||||
const='on', nargs='?')),
|
||||
(['--dns'],
|
||||
dict(help="choose dns provider api for letsencrypt",
|
||||
@@ -1186,6 +1186,9 @@ class WOSiteUpdateController(CementBaseController):
|
||||
elif pargs.letsencrypt == 'clean':
|
||||
data['letsencrypt'] = False
|
||||
letsencrypt = False
|
||||
elif pargs.letsencrypt == 'purge':
|
||||
data['letsencrypt'] = False
|
||||
letsencrypt = False
|
||||
|
||||
if letsencrypt is check_ssl:
|
||||
if letsencrypt is False:
|
||||
@@ -1214,13 +1217,16 @@ class WOSiteUpdateController(CementBaseController):
|
||||
|
||||
if pargs.letsencrypt == "on":
|
||||
if oldsitetype in ['wpsubdomain']:
|
||||
data['letsencrypt'] = True
|
||||
letsencrypt = True
|
||||
pargs.letsencrypt == 'wildcard'
|
||||
if pargs.dns:
|
||||
data['letsencrypt'] = True
|
||||
letsencrypt = True
|
||||
pargs.letsencrypt == 'wildcard'
|
||||
else:
|
||||
data['letsencrypt'] = True
|
||||
letsencrypt = True
|
||||
else:
|
||||
data['letsencrypt'] = True
|
||||
letsencrypt = True
|
||||
wildcard = False
|
||||
|
||||
if pargs.wpredis and data['currcachetype'] != 'wpredis':
|
||||
data['wpredis'] = True
|
||||
@@ -1345,16 +1351,9 @@ class WOSiteUpdateController(CementBaseController):
|
||||
'{0}/conf/nginx/'
|
||||
'hsts.conf.disabled'
|
||||
.format(wo_site_webroot))
|
||||
if self.app.pargs.letsencrypt == "clean":
|
||||
if os.path.isfile("{0}/conf/nginx/ssl.conf"
|
||||
.format(wo_site_webroot)):
|
||||
WOFileUtils.remove(self, "{0}/conf/nginx/ssl.conf"
|
||||
.format(wo_site_webroot))
|
||||
WOFileUtils.remove(self, "/etc/letsencrypt/live"
|
||||
"/{0}".format(wo_domain))
|
||||
WOFileUtils.remove(self, "/etc/nginx/conf.d/"
|
||||
"force-ssl-{0}.conf"
|
||||
.format(wo_domain_name))
|
||||
elif (self.app.pargs.letsencrypt == "clean" or
|
||||
self.app.pargs.letsencrypt == "purge"):
|
||||
removeAcmeConf(self, wo_domain)
|
||||
if not WOService.reload_service(self, 'nginx'):
|
||||
Log.error(self, "service nginx reload failed. "
|
||||
"check issues with `nginx -t` command")
|
||||
|
||||
@@ -1307,11 +1307,19 @@ def removeAcmeConf(self, domain):
|
||||
"-d {0} --ecc"
|
||||
.format(domain))
|
||||
except CommandExecutionError as e:
|
||||
Log.error(self, "Cert removal failed")
|
||||
WOFileUtils.remove(self, '/etc/letsencrypt/renewal/{0}_ecc'
|
||||
Log.error(self, "Cert removal failed")
|
||||
WOFileUtils.rm(self, '/etc/letsencrypt/renewal/{0}_ecc'
|
||||
.format(domain))
|
||||
WOFileUtils.remove(self, '/etc/letsencrypt/live/{0}'
|
||||
WOFileUtils.rm(self, '/etc/letsencrypt/live/{0}'
|
||||
.format(domain))
|
||||
WOFileUtils.rm(self, '/var/www/{0}/conf/nginx/ssl.conf'.format(domain))
|
||||
WOFileUtils.rm(self, '/var/www/{0}/conf/nginx/ssl.conf.disabled'
|
||||
.format(domain))
|
||||
WOFileUtils.rm(
|
||||
self, '/etc/nginx/conf.d/force-ssl-{0}.conf'.format(domain))
|
||||
WOFileUtils.rm(
|
||||
self, '/etc/nginx/conf.d/force-ssl-{0}.conf.disabled'.format(domain))
|
||||
|
||||
WOGit.add(self, ["/etc/letsencrypt"],
|
||||
msg="Deleted {0} "
|
||||
.format(domain))
|
||||
|
||||
@@ -158,7 +158,7 @@ class WOStackUpgradeController(CementBaseController):
|
||||
"/phpMyAdmin/{0}/"
|
||||
"phpMyAdmin-{0}-"
|
||||
"all-languages"
|
||||
".zip".format(WOVariables.wo_phpmyadmin),
|
||||
".tar.gz".format(WOVariables.wo_phpmyadmin),
|
||||
"/var/lib/wo/tmp/pma.tar.gz",
|
||||
"PHPMyAdmin"]]
|
||||
else:
|
||||
@@ -229,17 +229,17 @@ class WOStackUpgradeController(CementBaseController):
|
||||
|
||||
if self.app.pargs.phpmyadmin:
|
||||
Log.info(self, "Upgrading phpMyAdmin, please wait...")
|
||||
WOExtract.extract(
|
||||
self, '/var/lib/wo/tmp/pma.tar.gz', '/var/lib/wo/tmp/')
|
||||
shutil.copyfile('{0}22222/htdocs/db/pma'
|
||||
'/config.inc.php'
|
||||
.format(WOVariables.wo_webroot),
|
||||
'/var/lib/wo/tmp/phpMyAdmin-{0}'
|
||||
'-all-languages/config.inc.php'
|
||||
.format(WOVariables.wo_phpmyadmin)
|
||||
WOExtract.extract(self, '/var/lib/wo/tmp/pma.tar.gz',
|
||||
'/var/lib/wo/tmp/')
|
||||
shutil.copyfile(('{0}22222/htdocs/db/pma'
|
||||
'/config.inc.php'
|
||||
.format(WOVariables.wo_webroot)),
|
||||
('/var/lib/wo/tmp/phpMyAdmin-{0}'
|
||||
'-all-languages/config.inc.php'
|
||||
.format(WOVariables.wo_phpmyadmin))
|
||||
)
|
||||
WOFileUtils.remove(self, '{0}22222/htdocs/db/pma'
|
||||
.format(WOVariables.wo_webroot))
|
||||
WOFileUtils.rm(self, '{0}22222/htdocs/db/pma'
|
||||
.format(WOVariables.wo_webroot))
|
||||
shutil.move('/var/lib/wo/tmp/phpMyAdmin-{0}'
|
||||
'-all-languages/'
|
||||
.format(WOVariables.wo_phpmyadmin),
|
||||
|
||||
@@ -83,11 +83,14 @@ class WOAptGet():
|
||||
try:
|
||||
with open('/var/log/wo/wordops.log', 'a') as f:
|
||||
proc = subprocess.Popen("DEBIAN_FRONTEND=noninteractive "
|
||||
"apt-get dist-upgrade -o "
|
||||
"Dpkg::Options::=\"--force-confdef\""
|
||||
" -o "
|
||||
"Dpkg::Options::=\"--force-confold\""
|
||||
" -y ",
|
||||
"apt-get dist-upgrade "
|
||||
"--option=Dpkg::options::="
|
||||
"--force-confdef "
|
||||
"--option=Dpkg::options::="
|
||||
"--force-unsafe-io "
|
||||
"--option=Dpkg::options::="
|
||||
"--force-confold "
|
||||
"--assume-yes --quiet ",
|
||||
shell=True, stdin=None,
|
||||
stdout=f, stderr=f,
|
||||
executable="/bin/bash")
|
||||
@@ -110,11 +113,13 @@ class WOAptGet():
|
||||
try:
|
||||
with open('/var/log/wo/wordops.log', 'a') as f:
|
||||
proc = subprocess.Popen("DEBIAN_FRONTEND=noninteractive "
|
||||
"apt-get install -o "
|
||||
"Dpkg::Options::=\"--force-confdef\""
|
||||
" -o "
|
||||
"Dpkg::Options::=\"--force-confold\""
|
||||
" -y --allow-unauthenticated {0}"
|
||||
"apt-get install "
|
||||
"--option=Dpkg::options::="
|
||||
"--force-confdef "
|
||||
"--option=Dpkg::options::="
|
||||
"--force-confold "
|
||||
"--assume-yes "
|
||||
"--allow-unauthenticated {0}"
|
||||
.format(all_packages), shell=True,
|
||||
stdin=None, stdout=f, stderr=f,
|
||||
executable="/bin/bash")
|
||||
@@ -141,12 +146,14 @@ class WOAptGet():
|
||||
try:
|
||||
with open('/var/log/wo/wordops.log', 'a') as f:
|
||||
if purge:
|
||||
proc = subprocess.Popen('apt-get purge -y {0}'
|
||||
proc = subprocess.Popen('apt-get autoremove --purge '
|
||||
'--assume-yes {0}'
|
||||
.format(all_packages), shell=True,
|
||||
stdin=None, stdout=f, stderr=f,
|
||||
executable="/bin/bash")
|
||||
else:
|
||||
proc = subprocess.Popen('apt-get remove -y {0}'
|
||||
proc = subprocess.Popen('apt-get autoremove '
|
||||
'--assume-yes {0}'
|
||||
.format(all_packages), shell=True,
|
||||
stdin=None, stdout=f, stderr=f,
|
||||
executable="/bin/bash")
|
||||
|
||||
@@ -11,7 +11,7 @@ class WOVariables():
|
||||
"""Intialization of core variables"""
|
||||
|
||||
# WordOps version
|
||||
wo_version = "3.9.6.1"
|
||||
wo_version = "3.9.6.2"
|
||||
# WordOps packages versions
|
||||
wo_wp_cli = "2.2.0"
|
||||
wo_adminer = "4.7.1"
|
||||
|
||||
Reference in New Issue
Block a user