From 1f581f9cffbcd91e7c5d2dc75564bfad84fb6d96 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs <me@danielgibbs.co.uk> Date: Thu, 17 Sep 2020 11:00:56 +0100 Subject: [PATCH] update curl command --- lgsm/functions/alert_rocketchat.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/alert_rocketchat.sh b/lgsm/functions/alert_rocketchat.sh index dddd473e8..46d38cba6 100755 --- a/lgsm/functions/alert_rocketchat.sh +++ b/lgsm/functions/alert_rocketchat.sh @@ -18,7 +18,7 @@ json=$(cat <<EOF "attachments":[ { "title":"Linuxgsm Alert", - "text":"Hostname: ${HOSTNAME}", + "text":"Hostname: ${HOSTNAME}", "color":"#36a64f", "fields":[ { @@ -45,7 +45,7 @@ EOF fn_print_dots "Sending Rocketchat alert" -rocketlaunch=$(curl -X POST -H "Content-Type:application/json" --data "$(echo -n "$json" | jq -c .)" "${rocketchatwebhook}") +rocketlaunch=$(curl -sSL -H "Content-Type:application/json" -X POST --d "$(echo -n "$json" | jq -c .)" "${rocketchatwebhook}") if [ "${rocketlaunch}" == "ok" ]; then fn_print_ok_nl "Sending Rocketchat alert"