+ # First we bring the hook down
+ hook_config_cmd "down" "${zone}" "${hook}" "${hook}.${id}"
+
+ # If a hook_destroy function is implemented in the hook this function will be executed.
+ # If not a empty defined in header-config is executed.
+ if ! hook_config_cmd "destroy" "${zone}" "${hook}" "${hook}.${id}" "$@"; then
+
+ # A better error message should printed inside the hook.
+ # We will not bring the config up because we do not know if it is safe or if some parts are already destroyed.
+ log ERROR "Could not destroy config with the follwoing id: ${id}"
+ return ${EXIT_ERROR}
+ fi
+
+ # Now we delete the config of the zone
+ zone_config_settings_destroy "${zone}" "${hook}.${id}"