|
@@ -37,9 +37,18 @@ if [[ ! -f "/app/data/.dbsetup" ]]; then
|
|
--admin_email="${admin_email}"
|
|
--admin_email="${admin_email}"
|
|
echo "WP is now installed"
|
|
echo "WP is now installed"
|
|
|
|
|
|
- # install and backup the plugins. mu plugins are a "flat" structure"
|
|
|
|
- # sadly mu-plugins can still be re-configured, just not uninstallable
|
|
|
|
- echo "Unpacking plugins on first run"
|
|
|
|
|
|
+ touch "/app/data/.dbsetup"
|
|
|
|
+else
|
|
|
|
+ # Update wordpress
|
|
|
|
+ echo "Updating wordpress database"
|
|
|
|
+ $WP core update-db
|
|
|
|
+fi
|
|
|
|
+
|
|
|
|
+# install and backup the plugins. mu plugins are a "flat" structure
|
|
|
|
+# sadly mu-plugins can still be re-configured, just not uninstallable
|
|
|
|
+# We have to do this on every run to get plugin updates
|
|
|
|
+if [[ ! -f "/run/wordpress/plugins_unpacked" ]]; then
|
|
|
|
+ echo "Unpacking plugins"
|
|
unzip -d /app/data/wp-content/mu-plugins/ /app/code/disable-wordpress-updates.zip
|
|
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/
|
|
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 -rf /app/data/wp-content/mu-plugins/disable-wordpress-updates/
|
|
@@ -52,11 +61,9 @@ if [[ ! -f "/app/data/.dbsetup" ]]; then
|
|
mv /app/data/wp-content/mu-plugins/authLdap-*/* /app/data/wp-content/mu-plugins/
|
|
mv /app/data/wp-content/mu-plugins/authLdap-*/* /app/data/wp-content/mu-plugins/
|
|
rm -rf /app/data/wp-content/mu-plugins/authLdap-*/
|
|
rm -rf /app/data/wp-content/mu-plugins/authLdap-*/
|
|
|
|
|
|
- touch "/app/data/.dbsetup"
|
|
|
|
|
|
+ touch /run/wordpress/plugins_unpacked
|
|
else
|
|
else
|
|
- # Update wordpress
|
|
|
|
- echo "Updating wordpress database"
|
|
|
|
- $WP core update-db
|
|
|
|
|
|
+ echo "Plugins already unpacked from previous run" # restarts
|
|
fi
|
|
fi
|
|
|
|
|
|
# configure WP mail smtp plugin (smtp_user, smtp_pass can be set when supported)
|
|
# configure WP mail smtp plugin (smtp_user, smtp_pass can be set when supported)
|