repo: music
action: commit
revision: 
path_from: 
revision_from: 04de7b1aac15b47273a0cad9fb3548a681084416:
path_to: 
revision_to: 
git.thebackupbox.net
music
git clone git://git.thebackupbox.net/music
commit 04de7b1aac15b47273a0cad9fb3548a681084416
Author: epoch 
Date:   Sat Feb 20 22:41:29 2021 -0600

    put in a check to music-pop for whether a pushuri file exists

diff --git a/music-pop b/music-pop
index fb20416338555c697aebd01e4dad0ae947943d3b..
index ..8f08522cb58c58c73f43bf6e7e6326b128161ffb 100755
--- a/music-pop
+++ b/music-pop
@@ -1,8 +1,12 @@
 #!/bin/sh
+if [ ! -s "${PREFIX}/run/music/pushuri" ];then
+  printf "pushuri file is missing or empty. probably not pushing audio.\n" >&2
+  exit 1
+fi
 uri="$(cat ${PREFIX}/run/music/pushuri)"
 if [ ! "$uri" ];then
   printf "not pushing audio. no where to send it to.\n" >&2
-  exit 1
+  exit 2
 fi
 which uricut && domain="$(printf "%s\n" "$uri" | uricut -d)" || domain=radio.tildeverse.org
 which uricut && port="$(printf "%s\n" "$uri" | uricut -P)"   || port=8005

-----END OF PAGE-----