#!/bin/bash
set -u

source "$(dirname "$0")"/custom/common.sh

dyn_config=$(setman-restore "${FIREWALL_SETS_NAME}" dynamic_config.json)

if [ $? -ne 0 ]; then
	setman-log debug "firewall/dynamic-config restore not found a file"
else
	cat >"${FIREWALL_CFG_FILE}" <<<"$dyn_config"

	setman-log debug "firewall/dynamic-config restored successfully"
fi
