Final fix for plugin data import in json
This commit is contained in:
@@ -30,6 +30,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|||||||
- Kernel tweaks were not applied without server reboot
|
- Kernel tweaks were not applied without server reboot
|
||||||
- Fail2ban standalone install
|
- Fail2ban standalone install
|
||||||
- `wo stack purge --all` error due to PHP7.3 check
|
- `wo stack purge --all` error due to PHP7.3 check
|
||||||
|
- Nginx helper configuration during plugin install for Nginx fastcgi_cache and redis-cache
|
||||||
|
|
||||||
### v3.9.6.2 - 2019-07-24
|
### v3.9.6.2 - 2019-07-24
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ from wo.core.nginxhashbucket import hashbucket
|
|||||||
import os
|
import os
|
||||||
import glob
|
import glob
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import json
|
||||||
|
|
||||||
|
|
||||||
def wo_site_hook(app):
|
def wo_site_hook(app):
|
||||||
@@ -1480,21 +1481,29 @@ class WOSiteUpdateController(CementBaseController):
|
|||||||
(data['wpfc'])) or (oldsitetype == 'wp' and
|
(data['wpfc'])) or (oldsitetype == 'wp' and
|
||||||
data['multisite'] and data['wpfc'])):
|
data['multisite'] and data['wpfc'])):
|
||||||
try:
|
try:
|
||||||
plugin_data = '{"log_level":"INFO","log_filesize":5,'
|
plugin_data_object = {"log_level": "INFO",
|
||||||
'"enable_purge":1,"enable_map":0,"enable_log":0,'
|
"log_filesize": 5,
|
||||||
'"enable_stamp":0,"purge_homepage_on_new":1,'
|
"enable_purge": 1,
|
||||||
'"purge_homepage_on_edit":1,"purge_homepage_on_del":1,'
|
"enable_map": "0",
|
||||||
'"purge_archive_on_new":1,"purge_archive_on_edit":0,'
|
"enable_log": 0,
|
||||||
'"purge_archive_on_del":0,'
|
"enable_stamp": 0,
|
||||||
'"purge_archive_on_new_comment":0,'
|
"purge_homepage_on_new": 1,
|
||||||
'"purge_archive_on_deleted_comment":0,'
|
"purge_homepage_on_edit": 1,
|
||||||
'"purge_page_on_mod":1,'
|
"purge_homepage_on_del": 1,
|
||||||
'"purge_page_on_new_comment":1,'
|
"purge_archive_on_new": 1,
|
||||||
'"purge_page_on_deleted_comment":1,'
|
"purge_archive_on_edit": 0,
|
||||||
'"cache_method":"enable_fastcgi",'
|
"purge_archive_on_del": 0,
|
||||||
'"purge_method":"get_request",'
|
"purge_archive_on_new_comment": 0,
|
||||||
'"redis_hostname":"127.0.0.1","redis_port":"6379",'
|
"purge_archive_on_deleted_comment": 0,
|
||||||
'"redis_prefix":"nginx-cache:"}'
|
"purge_page_on_mod": 1,
|
||||||
|
"purge_page_on_new_comment": 1,
|
||||||
|
"purge_page_on_deleted_comment": 1,
|
||||||
|
"cache_method": "enable_fastcgi",
|
||||||
|
"purge_method": "get_request",
|
||||||
|
"redis_hostname": "127.0.0.1",
|
||||||
|
"redis_port": "6379",
|
||||||
|
"redis_prefix": "nginx-cache:"}
|
||||||
|
plugin_data = json.dumps(plugin_data_object)
|
||||||
setupwp_plugin(
|
setupwp_plugin(
|
||||||
self, 'nginx-helper',
|
self, 'nginx-helper',
|
||||||
'rt_wp_nginx_helper_options', plugin_data, data)
|
'rt_wp_nginx_helper_options', plugin_data, data)
|
||||||
@@ -1512,21 +1521,29 @@ class WOSiteUpdateController(CementBaseController):
|
|||||||
data['multisite'] and
|
data['multisite'] and
|
||||||
data['wpredis'])):
|
data['wpredis'])):
|
||||||
try:
|
try:
|
||||||
plugin_data = '{"log_level":"INFO","log_filesize":5,'
|
plugin_data_object = {"log_level": "INFO",
|
||||||
'"enable_purge":1,"enable_map":0,"enable_log":0,'
|
"log_filesize": 5,
|
||||||
'"enable_stamp":0,"purge_homepage_on_new":1,'
|
"enable_purge": 1,
|
||||||
'"purge_homepage_on_edit":1,"purge_homepage_on_del":1,'
|
"enable_map": "0",
|
||||||
'"purge_archive_on_new":1,"purge_archive_on_edit":0,'
|
"enable_log": 0,
|
||||||
'"purge_archive_on_del":0,'
|
"enable_stamp": 0,
|
||||||
'"purge_archive_on_new_comment":0,'
|
"purge_homepage_on_new": 1,
|
||||||
'"purge_archive_on_deleted_comment":0,'
|
"purge_homepage_on_edit": 1,
|
||||||
'"purge_page_on_mod":1,'
|
"purge_homepage_on_del": 1,
|
||||||
'"purge_page_on_new_comment":1,'
|
"purge_archive_on_new": 1,
|
||||||
'"purge_page_on_deleted_comment":1,'
|
"purge_archive_on_edit": 0,
|
||||||
'"cache_method":"enable_redis",'
|
"purge_archive_on_del": 0,
|
||||||
'"purge_method":"get_request",'
|
"purge_archive_on_new_comment": 0,
|
||||||
'"redis_hostname":"127.0.0.1","redis_port":"6379",'
|
"purge_archive_on_deleted_comment": 0,
|
||||||
'"redis_prefix":"nginx-cache:"}'
|
"purge_page_on_mod": 1,
|
||||||
|
"purge_page_on_new_comment": 1,
|
||||||
|
"purge_page_on_deleted_comment": 1,
|
||||||
|
"cache_method": "enable_redis",
|
||||||
|
"purge_method": "get_request",
|
||||||
|
"redis_hostname": "127.0.0.1",
|
||||||
|
"redis_port": "6379",
|
||||||
|
"redis_prefix": "nginx-cache:"}
|
||||||
|
plugin_data = json.dumps(plugin_data_object)
|
||||||
setupwp_plugin(
|
setupwp_plugin(
|
||||||
self, 'nginx-helper',
|
self, 'nginx-helper',
|
||||||
'rt_wp_nginx_helper_options', plugin_data, data)
|
'rt_wp_nginx_helper_options', plugin_data, data)
|
||||||
@@ -1540,20 +1557,29 @@ class WOSiteUpdateController(CementBaseController):
|
|||||||
return 1
|
return 1
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
plugin_data = '{"log_level":"INFO","log_filesize":5,'
|
plugin_data_object = {"log_level": "INFO",
|
||||||
'"enable_purge":0,"enable_map":0,"enable_log":0,'
|
"log_filesize": 5,
|
||||||
'"enable_stamp":0,"purge_homepage_on_new":1,'
|
"enable_purge": 0,
|
||||||
'"purge_homepage_on_edit":1,"purge_homepage_on_del":1,'
|
"enable_map": 0,
|
||||||
'"purge_archive_on_new":1,"purge_archive_on_edit":0,'
|
"enable_log": 0,
|
||||||
'"purge_archive_on_del":0,'
|
"enable_stamp": 0,
|
||||||
'"purge_archive_on_new_comment":0,'
|
"purge_homepage_on_new": 1,
|
||||||
'"purge_archive_on_deleted_comment":0,'
|
"purge_homepage_on_edit": 1,
|
||||||
'"purge_page_on_mod":1,"purge_page_on_new_comment":1,'
|
"purge_homepage_on_del": 1,
|
||||||
'"purge_page_on_deleted_comment":1,'
|
"purge_archive_on_new": 1,
|
||||||
'"cache_method":"enable_redis",'
|
"purge_archive_on_edit": 0,
|
||||||
'"purge_method":"get_request",'
|
"purge_archive_on_del": 0,
|
||||||
'"redis_hostname":"127.0.0.1",'
|
"purge_archive_on_new_comment": 0,
|
||||||
'"redis_port":"6379","redis_prefix":"nginx-cache:"}'
|
"purge_archive_on_deleted_comment": 0,
|
||||||
|
"purge_page_on_mod": 1,
|
||||||
|
"purge_page_on_new_comment": 1,
|
||||||
|
"purge_page_on_deleted_comment": 1,
|
||||||
|
"cache_method": "enable_redis",
|
||||||
|
"purge_method": "get_request",
|
||||||
|
"redis_hostname": "127.0.0.1",
|
||||||
|
"redis_port": "6379",
|
||||||
|
"redis_prefix": "nginx-cache:"}
|
||||||
|
plugin_data = json.dumps(plugin_data_object)
|
||||||
setupwp_plugin(
|
setupwp_plugin(
|
||||||
self, 'nginx-helper',
|
self, 'nginx-helper',
|
||||||
'rt_wp_nginx_helper_options', plugin_data, data)
|
'rt_wp_nginx_helper_options', plugin_data, data)
|
||||||
|
|||||||
Reference in New Issue
Block a user