Browse Source

new: [send] add IP of host in notif tags

pull/47/head
Boris Gallet 4 weeks ago
parent
commit
20a1344fbb
  1. 4
      docker-host/src/bin/send

4
docker-host/src/bin/send

@ -39,6 +39,7 @@ for var in SERVER LOGIN PASSWORD; do
fi
done
IP_HOST=$(hostname -I | cut -d' ' -f1)
exname=${0##*/}
channels=()
@ -125,6 +126,7 @@ curl_opts=(
title="[$(hostname)] $title"
title="${title%%+([[:space:]])}"
curl_opts+=(-H "Title: $title")
curl_opts+=(-H "Tags: $IP_HOST")
declare -A sent_topic=()
@ -163,4 +165,4 @@ for channel in "${channels[@]}"; do
done
done < <(printf "%s" "$topics" | yq e -0 '.[]')
done < <(printf "%s" "$content" | yq e -0 'to_entries | .[] | [.key, .value] |.[]')
done
done
Loading…
Cancel
Save