From 06c16bcae1b7354ffb211d23b5e27f9070a9073d Mon Sep 17 00:00:00 2001 From: Lucas Yang Date: Wed, 19 Aug 2020 16:48:27 +0800 Subject: [PATCH] Create host_defender_install.sh Host defender install script. --- host_defender_install.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 host_defender_install.sh diff --git a/host_defender_install.sh b/host_defender_install.sh new file mode 100644 index 00000000..534b6ade --- /dev/null +++ b/host_defender_install.sh @@ -0,0 +1,7 @@ +#!/bin/sh +#Get token +token=$(curl -H "Content-Type: application/json" \ + -d '{"username":"", "password":""}' \ + https:///api/v1/authenticate | sed 's/{"token":"//g;s/"}//g') +#Install Defender +curl -sSL -k --header "authorization: Bearer ${token}" https:///api/v1/scripts/defender.sh | sudo bash -s -- -c "asia-northeast1.cloud.twistlock.com" -d "none" --install-host