Skip to content

Commit

Permalink
auto fix update wpcacheenabler_map.conf in 123.09beta01
Browse files Browse the repository at this point in the history
Auto update fix /usr/local/nginx/conf/wpcacheenabler_map.conf via centmin.sh menu run for improperly escaped double quotes https://community.centminmod.com/threads/centmin-sh-menu-22-add-wpcli_ce_querystring_included-n-in-123-09beta01.20291/#post-86007
  • Loading branch information
centminmod committed Sep 4, 2020
1 parent 2f8e5f7 commit c7987c0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion centmin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ DT=$(date +"%d%m%y-%H%M%S")
branchname='123.09beta01'
SCRIPT_MAJORVER='1.2.3'
SCRIPT_MINORVER='09'
SCRIPT_INCREMENTVER='580'
SCRIPT_INCREMENTVER='581'
SCRIPT_VERSIONSHORT="${branchname}"
SCRIPT_VERSION="${SCRIPT_VERSIONSHORT}.b${SCRIPT_INCREMENTVER}"
SCRIPT_DATE='31/07/2020'
Expand Down
13 changes: 13 additions & 0 deletions inc/cpcheck.inc
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
update_wpce_map() {
if [ -f /usr/local/nginx/conf/wpcacheenabler_map.conf ]; then
# fix improper escapped entries
if [[ "$(grep -q '\"' /usr/local/nginx/conf/wpcacheenabler_map.conf)" ]]; then
sed -i 's|\\"|"|g' /usr/local/nginx/conf/wpcacheenabler_map.conf
if [[ "$(ps aufx | grep nginx | grep -v grep | grep nginx >/dev/null 2>&1; echo $?)" -eq '0' ]]; then
service nginx reload >/dev/null 2>&1
fi
fi
fi
}

update_cache_enabler_schemefix() {
if [[ -d /usr/local/nginx/conf/wpincludes && $(grep 'cache-enabler/\${http_host}\${cache_uri}index' /usr/local/nginx/conf/wpincludes/*/wpcacheenabler_*.conf >/dev/null 2>&1; echo $?) -eq '0' ]]; then
touch "${CENTMINLOGDIR}/centminmod_${SCRIPT_VERSION}_${DT}_cache_enabler_scheme_fix.log"
Expand Down Expand Up @@ -3133,6 +3145,7 @@ if [[ "$INITIALINSTALL" != [yY] ]]; then
imagemagick_heif
fix_nasm
update_cache_enabler_schemefix
update_wpce_map
fi

}
Expand Down

0 comments on commit c7987c0

Please sign in to comment.