#!/usr/bin/env bash
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x

trigger-scheduler-docker-local-post-create() {
  declare desc="scheduler-docker-local post-create plugin trigger"
  declare trigger="post-create"
  declare APP="$1"

  mkdir -p "${DOKKU_LIB_ROOT}/data/scheduler-docker-local/${APP}"
  chown -R "${DOKKU_SYSTEM_USER}:${DOKKU_SYSTEM_GROUP}" "${DOKKU_LIB_ROOT}/data/scheduler-docker-local/${APP}"
}

trigger-scheduler-docker-local-post-create "$@"
