diff --git a/rootfs/etc/cont-init.d/20-install-plugins b/rootfs/etc/cont-init.d/20-install-plugins index d9a6ae3..ef4aa1b 100755 --- a/rootfs/etc/cont-init.d/20-install-plugins +++ b/rootfs/etc/cont-init.d/20-install-plugins @@ -15,12 +15,6 @@ echo "> About to install defined plugins" for PLUGIN_EXPR in ${PLUGIN_LIST}; do IFS=':' read -ra PLUGIN <<<"${PLUGIN_EXPR}" - WP_PLUGIN_INSTALL_ARGS="${PLUGIN[0]}" - - if [ -n "${PLUGIN[1]}" ]; then - WP_PLUGIN_INSTALL_ARGS="${WP_PLUGIN_INSTALL_ARGS} --version=${PLUGIN[1]}" - fi - PLUGIN_PATH="${WP_CONTENT_PATH}/plugins/${PLUGIN[0]}" if [ -d "${PLUGIN_PATH}" ] || [ -f "${PLUGIN_PATH}.php" ]; then @@ -28,6 +22,12 @@ for PLUGIN_EXPR in ${PLUGIN_LIST}; do continue fi + WP_PLUGIN_INSTALL_ARGS="${PLUGIN[0]}" + + if [ -n "${PLUGIN[1]}" ]; then + WP_PLUGIN_INSTALL_ARGS="${WP_PLUGIN_INSTALL_ARGS} --version=${PLUGIN[1]}" + fi + echo "> Installing plugin '${PLUGIN[0]}' version '${PLUGIN[1]}'" wp plugin install ${WP_PLUGIN_INSTALL_ARGS} done \ No newline at end of file