Эх сурвалжийг харах

Only disable core updates

Fixes #9
Girish Ramakrishnan 8 жил өмнө
parent
commit
cbe8e3498e
2 өөрчлөгдсөн 5 нэмэгдсэн , 4 устгасан
  1. 1 1
      Dockerfile
  2. 4 3
      start.sh

+ 1 - 1
Dockerfile

@@ -23,7 +23,7 @@ RUN /bin/echo -e "apache_modules:\n  - mod_rewrite" > /app/code/wp-cli.yml
 
 # Get the plugins
 RUN curl -L -o /app/code/authLdap.zip https://github.com/heiglandreas/authLdap/archive/1.4.21.zip
-RUN curl -L -o /app/code/disable-wordpress-updates.zip https://downloads.wordpress.org/plugin/disable-wordpress-updates.1.4.8.zip
+RUN curl -L -o /app/code/disable-wordpress-core-update.zip https://downloads.wordpress.org/plugin/disable-wordpress-core-update.zip
 RUN curl -L -o /app/code/wp-mail-smtp.zip https://downloads.wordpress.org/plugin/wp-mail-smtp.0.10.1.zip
 
 RUN chown -R www-data:www-data /app/code

+ 4 - 3
start.sh

@@ -73,9 +73,10 @@ if [[ ! -f "/run/wordpress/plugins_unpacked" ]]; then
     # clear the directory, otherwise unzip/mv have to be forced
     rm -rf /app/data/wp-content/mu-plugins/*
 
-    unzip -d /app/data/wp-content/mu-plugins/ /app/code/disable-wordpress-updates.zip
-    mv /app/data/wp-content/mu-plugins/disable-wordpress-updates/* /app/data/wp-content/mu-plugins/
-    rm -rf /app/data/wp-content/mu-plugins/disable-wordpress-updates/
+    rm -f /app/data/wp-content/mu-plugins/disable-updates.php # remove the old plugin we used
+    unzip -d /app/data/wp-content/mu-plugins/ /app/code/disable-wordpress-core-update.zip
+    mv /app/data/wp-content/mu-plugins/disable-wordpress-core-update/* /app/data/wp-content/mu-plugins/
+    rm -rf /app/data/wp-content/mu-plugins/disable-wordpress-core-update/
 
     unzip -d /app/data/wp-content/mu-plugins/ /app/code/wp-mail-smtp.zip
     mv /app/data/wp-content/mu-plugins/wp-mail-smtp/* /app/data/wp-content/mu-plugins/