From dfbfe3669255b4b8a0300a704424aff7dacb8793 Mon Sep 17 00:00:00 2001 From: DC Date: Tue, 8 Jun 2021 10:25:49 -0400 Subject: [PATCH] Adds script for use in the trend micro dev account. Allows proper testing of split load balancer. --- scripts/set-lb-settings-dev.sh | 54 ++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 scripts/set-lb-settings-dev.sh diff --git a/scripts/set-lb-settings-dev.sh b/scripts/set-lb-settings-dev.sh new file mode 100644 index 0000000..3e71cf0 --- /dev/null +++ b/scripts/set-lb-settings-dev.sh @@ -0,0 +1,54 @@ +#!/bin/bash +##set-lb-settings +user=$1 +pass=$2 +managerfqdn=$3 +consoleport=$4 +heartbeatfqdn=$5 +heartbeatport=$6 +relayfqdn=$7 +relayport=$8 +manager=localhost:${4} + + +SID=`curl -k -H "Content-Type: application/json" -X POST "https://${manager}/rest/authentication/login/primary" -d '{"dsCredentials":{"userName":"'${user}'","password":"'${pass}'"}}'` + +curl -k -v -H "Content-Type: text/xml;charset=UTF-8" -H 'SOAPAction: "systemSettingSet"' "https://localhost:/webservice/Manager" -d \ +''\ +''\ +''\ +''\ +''\ +'CONFIGURATION_SYSTEMLOADBALANCERHEARTBEATHOSTNAME'\ +'NONE'\ +''${heartbeatfqdn}''\ +''\ +''\ +'CONFIGURATION_SYSTEMLOADBALANCERHEARTBEATPORT'\ +'PORT'\ +''${heartbeatport}''\ +''\ +''\ +'CONFIGURATION_SYSTEMLOADBALANCERMANAGERHOSTNAME'\ +'NONE'\ +''${managerfqdn}''\ +''\ +''\ +'CONFIGURATION_SYSTEMLOADBALANCERMANAGERPORT'\ +'PORT'\ +''${consoleport}''\ +''\ +''\ +'CONFIGURATION_SYSTEMLOADBALANCERRELAYHOSTNAME'\ +'NONE'\ +''${relayfqdn}''\ +''\ +''\ +'CONFIGURATION_SYSTEMLOADBALANCERRELAYPORT'\ +'NONE'\ +''${relayport}''\ +''\ +''${SID}''\ +''\ +''\ +' \ No newline at end of file