fix: allow enabling nginx-vhosts when skipped at install
Installing with the `dokku/nginx_enable` debconf option set to `false` left the nginx-vhosts plugin disabled with no way to turn it back on, as `dokku plugin:enable nginx-vhosts` reported that the plugin does not exist. The plugin can now be enabled after installation, and the debconf documentation explains the option's effect and how to reverse it.
This commit is contained in:
12
debian/postinst
vendored
12
debian/postinst
vendored
@@ -109,14 +109,18 @@ setup-plugins() {
|
||||
db_get "dokku/nginx_enable"
|
||||
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
|
||||
continue
|
||||
fi
|
||||
|
||||
ln -s "${DOKKU_LIB_ROOT}/core-plugins/available/$plugin" "${DOKKU_LIB_ROOT}/plugins/available/$plugin"
|
||||
if [ "$plugin" = "nginx-vhosts" ] && [ "$RET" = "false" ]; then
|
||||
echo "Skipping enable of nginx-vhosts plugin"
|
||||
continue
|
||||
elif [ ! -d "${DOKKU_LIB_ROOT}/plugins/available/$plugin" ]; then
|
||||
ln -s "${DOKKU_LIB_ROOT}/core-plugins/available/$plugin" "${DOKKU_LIB_ROOT}/plugins/available/$plugin"
|
||||
PLUGIN_PATH="${DOKKU_LIB_ROOT}/core-plugins" plugn enable "$plugin"
|
||||
PLUGIN_PATH="${DOKKU_LIB_ROOT}/plugins" plugn enable "$plugin"
|
||||
fi
|
||||
|
||||
PLUGIN_PATH="${DOKKU_LIB_ROOT}/core-plugins" plugn enable "$plugin"
|
||||
PLUGIN_PATH="${DOKKU_LIB_ROOT}/plugins" plugn enable "$plugin"
|
||||
done
|
||||
find -L "${DOKKU_LIB_ROOT}/core-plugins" -type l -delete
|
||||
find -L "${DOKKU_LIB_ROOT}/plugins" -type l -delete
|
||||
|
||||
Reference in New Issue
Block a user