#!/usr/bin/env bash
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"

trigger-scheduler-docker-local-post-app-rename-setup() {
  declare desc="updates settings when renaming an app"
  declare trigger="post-app-rename-setup"
  declare OLD_APP="$1" NEW_APP="$2"

  fn-plugin-property-clone "scheduler-docker-local" "$OLD_APP" "$NEW_APP"
  fn-plugin-property-destroy "scheduler-docker-local" "$OLD_APP"
}

trigger-scheduler-docker-local-post-app-rename-setup "$@"
