|
|
@ -4020,8 +4020,8 @@ fi |
|
|
|
if [ "$action" == "run" -a "${#services_args}" != 0 ]; then |
|
|
|
charm=$(get_service_charm "${services_args[0]}") || exit 1 |
|
|
|
metadata=$(charm.metadata "$charm") || exit 1 |
|
|
|
type="$(printf "%s" "$metadata" | shyaml get-value type 2>/dev/null)" || true |
|
|
|
if [ "$type" == "run-once" ]; then |
|
|
|
SERVICE_TYPE="$(printf "%s" "$metadata" | shyaml get-value type 2>/dev/null)" || true |
|
|
|
if [ "$SERVICE_TYPE" == "run-once" ]; then |
|
|
|
run_service_hook dc-pre-run "${services_args[@]}" || exit 1 |
|
|
|
fi |
|
|
|
fi |
|
|
@ -4090,4 +4090,10 @@ if [ "$post_hook" -a "${#services_args[@]}" != 0 ]; then |
|
|
|
run_service_hook post_deploy "${services_args[@]}" || exit 1 |
|
|
|
fi |
|
|
|
|
|
|
|
if [ "$action" == "run" -a "${#services_args}" != 0 ]; then |
|
|
|
if [ "$SERVICE_TYPE" == "run-once" ]; then |
|
|
|
run_service_hook dc-post-run "${services_args[@]}" || exit 1 |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
clean_unused_docker_compose || return 1 |