modify user password update script for theHive, keep it in consistency with Fleet counterpart.

This commit is contained in:
HE Chong
2021-08-13 21:52:19 +08:00
parent 2030ef65f1
commit 0d5e3771f5

View File

@@ -49,9 +49,9 @@ fi
# Change password for user in TheHive
resp=$(curl -sk -XPOST -H "Authorization: Bearer $THEHIVE_KEY" -H "Content-Type: application/json" -L "https://$THEHVIE_API_URL/user/${THEHIVE_USER}/password/set" -d "{\"password\" : \"$THEHIVE_PASS\"}")
if [[ -z "$resp" ]]; then
echo "Successfully changed TheHive user password"
echo "Successfully updated TheHive user password"
else
echo "Changing TheHive user password failed"
echo "Unable to update TheHive user password"
echo $resp
exit 2
fi