From 9432cdd37ccb8fff653216f90d17ce8271ea7a33 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Tue, 13 Aug 2019 12:58:15 -0400 Subject: [PATCH] fix: remove the build-env plugin from rpm installs Closes #3646 --- rpm/dokku.postinst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/rpm/dokku.postinst b/rpm/dokku.postinst index 7a9e791fe..4d89de70d 100644 --- a/rpm/dokku.postinst +++ b/rpm/dokku.postinst @@ -24,6 +24,17 @@ setup-plugins() { mkdir -p "${DOKKU_LIB_ROOT}/core-plugins/enabled" "${DOKKU_LIB_ROOT}/plugins/enabled" touch "${DOKKU_LIB_ROOT}/core-plugins/config.toml" "${DOKKU_LIB_ROOT}/plugins/config.toml" + echo "Migrating old plugins" + find ${DOKKU_LIB_ROOT}/plugins/ -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | while read -r plugin; do + if [ "$plugin" = "available" ] || [ "$plugin" = "enabled" ]; then + continue + elif [ -f ${DOKKU_LIB_ROOT}/plugins/$plugin/.core ]; then + rm -rf ${DOKKU_LIB_ROOT}/plugins/$plugin + elif [ ! -d ${DOKKU_LIB_ROOT}/plugins/available/$plugin ]; then + mv ${DOKKU_LIB_ROOT}/plugins/$plugin ${DOKKU_LIB_ROOT}/plugins/available + fi + done + echo "Enabling all core plugins" find "${DOKKU_LIB_ROOT}/core-plugins/available" -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | while read -r plugin; do if [ ! -d "${DOKKU_LIB_ROOT}/plugins/available/$plugin" ]; then