From 55b742ae33eead50dce8c5487d07913aa912e144 Mon Sep 17 00:00:00 2001 From: Cold-Egg Date: Tue, 6 Dec 2022 15:51:48 +0800 Subject: [PATCH] Fix cache for Theme 2023 modified: bin/container/appinstallctl.sh --- bin/container/appinstallctl.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/bin/container/appinstallctl.sh b/bin/container/appinstallctl.sh index 0d48746..d79c63f 100755 --- a/bin/container/appinstallctl.sh +++ b/bin/container/appinstallctl.sh @@ -540,10 +540,21 @@ filetype[0] = '.aac ; <------------ CDN Mapping Example END ------------------> EOM - if [ ! -f ${VH_DOC_ROOT}/wp-content/themes/${THEME}/functions.php.bk ]; then - cp ${VH_DOC_ROOT}/wp-content/themes/${THEME}/functions.php ${VH_DOC_ROOT}/wp-content/themes/${THEME}/functions.php.bk + THEME_PATH="${VH_DOC_ROOT}/wp-content/themes/${THEME}" + if [ ! -f ${THEME_PATH}/functions.php ]; then + cat >> "${THEME_PATH}/functions.php" <>/dev/null 2>&1 + ed ${THEME_PATH}/functions.php << END >>/dev/null 2>&1 2i require_once( WP_CONTENT_DIR.'/../wp-admin/includes/plugin.php' ); \$path = 'litespeed-cache/litespeed-cache.php' ;