Add post config update hook
This adds a hook that will send in the $APP, action name and config vars. By adding this, we allow plugin creators to handle this kind of events as well. Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
This commit is contained in:
1 parent
51cd991174
commit
441272d54b
1 file changed
+3
@@ -187,6 +187,7 @@ ${var}"
|
|||||||
config_styled_hash "$ENV_ADD" " "
|
config_styled_hash "$ENV_ADD" " "
|
||||||
|
|
||||||
config_write "$ENV_TEMP"
|
config_write "$ENV_TEMP"
|
||||||
|
plugn trigger post-config-update $APP "set" "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$DOKKU_CONFIG_RESTART" == "true" ]]; then
|
if [[ "$DOKKU_CONFIG_RESTART" == "true" ]]; then
|
||||||
@@ -218,6 +219,8 @@ config_unset() {
|
|||||||
[[ "$var" == "NO_VHOST" ]] && config_set --no-restart $APP NO_VHOST=0 && DOKKU_CONFIG_RESTART=true
|
[[ "$var" == "NO_VHOST" ]] && config_set --no-restart $APP NO_VHOST=0 && DOKKU_CONFIG_RESTART=true
|
||||||
done
|
done
|
||||||
|
|
||||||
|
plugn trigger post-config-update $APP "unset" "$@"
|
||||||
|
|
||||||
if [[ "$DOKKU_CONFIG_RESTART" == "true" ]]; then
|
if [[ "$DOKKU_CONFIG_RESTART" == "true" ]]; then
|
||||||
dokku_log_info1 "Restarting app $APP"
|
dokku_log_info1 "Restarting app $APP"
|
||||||
dokku ps:restart $APP
|
dokku ps:restart $APP
|
||||||
|
|||||||
Reference in new issue
Block a user