diff options
author | tv <tv@krebsco.de> | 2023-01-06 12:17:36 +0100 |
---|---|---|
committer | tv <tv@krebsco.de> | 2023-01-06 12:17:36 +0100 |
commit | 2cd5ed169963725cabda22635f5b4439be5e9ad0 (patch) | |
tree | bc11f3954b96f2fad2349661a1e8c4569ea84160 /lass/2configs/radio/weather.nix | |
parent | 221d5dc01244ffce0c14426e90b76f392d4c5dfa (diff) | |
parent | 0b2952f4ed9572521f7c4a21904943ac33c602b0 (diff) |
Merge remote-tracking branch 'prism/master'
Diffstat (limited to 'lass/2configs/radio/weather.nix')
-rw-r--r-- | lass/2configs/radio/weather.nix | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lass/2configs/radio/weather.nix b/lass/2configs/radio/weather.nix index 704bf7218..ad96d8ec0 100644 --- a/lass/2configs/radio/weather.nix +++ b/lass/2configs/radio/weather.nix @@ -18,11 +18,14 @@ let MAXMIND_GEOIP_DB="/tmp/GeoLite2-City.mmdb"; export MAXMIND_GEOIP_DB OPENWEATHER_API_KEY=$(cat "$CREDENTIALS_DIRECTORY/openweather_api"); export OPENWEATHER_API_KEY ss -no 'sport = :8000' | - jc --ss | jq -r '.[] | - select( - .local_address != "[::ffff:127.0.0.1]" - and .local_address != "[::1]" - ) | .peer_address | gsub("[\\[\\]]"; "") + jc --ss | jq -r ' + [ + .[] | + select( + .local_address != "[::ffff:127.0.0.1]" + and .local_address != "[::1]" + ) | .peer_address | gsub("[\\[\\]]"; "") + ] | unique[] ' | ${weather_for_ips}/bin/weather_for_ips ''; |