summaryrefslogtreecommitdiffstats
path: root/lass
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2022-02-07 23:53:53 +0100
committerlassulus <lassulus@lassul.us>2022-02-07 23:53:53 +0100
commit12cc28782884a759119a469adbf2d7c51fdafb76 (patch)
treef2c66bcbcb201c8dfb76f84e8f4ef776841fdb4d /lass
parentb0d602cc15f2bc361bb88d062d37e50190e244de (diff)
l radio: fix listeners count
Diffstat (limited to 'lass')
-rw-r--r--lass/2configs/radio.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/lass/2configs/radio.nix b/lass/2configs/radio.nix
index f2a5a6371..15d07dada 100644
--- a/lass/2configs/radio.nix
+++ b/lass/2configs/radio.nix
@@ -235,7 +235,8 @@ in {
${pkgs.mpc_cli}/bin/mpc current -f %file%
done | while read track; do
- listeners=$(${pkgs.iproute}/bin/ss -Hno state established 'sport = :8000' | grep '^tcp' | wc -l)
+ listeners=$(${pkgs.curl}/bin/curl lassul.us:8000/status-json.xsl |
+ ${pkgs.jq}/bin/jq '[.icestats.source[].listeners] | add')
echo "$(date -Is)" "$track" | tee -a "$HISTORY_FILE"
echo "$(tail -$LIMIT "$HISTORY_FILE")" > "$HISTORY_FILE"
${set_irc_topic} "playing: $track listeners: $listeners"