From fd6239f44a9932a386a5b5b73d9b1a85b7c74f32 Mon Sep 17 00:00:00 2001 From: WrightNed <114073970+WrightNed@users.noreply.github.com> Date: Wed, 22 Feb 2023 16:36:19 +0200 Subject: [PATCH] Adding indication that policy was applied. --- nodes/orchestration/package/open-appsec-ctl.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nodes/orchestration/package/open-appsec-ctl.sh b/nodes/orchestration/package/open-appsec-ctl.sh index 317c6ff..e0f6153 100644 --- a/nodes/orchestration/package/open-appsec-ctl.sh +++ b/nodes/orchestration/package/open-appsec-ctl.sh @@ -1647,6 +1647,11 @@ run() # Initials - r elif [ "-ap" = "$1" ] || [ "--apply-policy" = "$1" ]; then curl_apply_policy=$(${curl_cmd} -S -w "%{http_code}\n" -m 1 --noproxy "*" --header "Content-Type: application/json" \ --request POST --data {} http://127.0.0.1:"$(extract_api_port 'orchestration')"/set-apply-policy 2>&1) + while [ /etc/cp/conf/local_policy.yaml -nt /etc/cp/conf/policy.json ]; do + echo -n "." + sleep 3 + done + echo "New policy applied." exit 1 elif [ "-lp" = "$1" ] || [ "--list-policies" = "$1" ]; then echo "/etc/cp/conf/local_policy.yaml"