X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=ffs;h=d63668b6e45b3736e479b37ba1851f32351b9df4;hb=989554cab0d0c59d1aab20496ba9550acd17e6e6;hp=9efc9f0ebc75e454a076cd01bfa047200632b027;hpb=8de1e14e35d0ad62620a59f6e2ca4ba19ddcda3c;p=distro-setup diff --git a/ffs b/ffs index 9efc9f0..d63668b 100755 --- a/ffs +++ b/ffs @@ -143,12 +143,22 @@ fi ##### end command line parsing ######## -host=live.iankelling.org:443 -if ip n show 10.2.0.1 | grep . &>/dev/null && \ - [[ $(dig +timeout=1 +short @10.2.0.1 -x 10.2.0.2 2>&1 ||:) == kd.b8.nz. ]]; then +host=live.iankelling.org:8443 +live_host=$(dig +timeout=1 +short @iankelling.org live.iankelling.org) +vps_host=$(dig +timeout=1 +short iankelling.org) +if [[ $live_host != "$vps_host" ]] && ip n show 10.2.0.1 | grep . &>/dev/null && \ + [[ $(dig +timeout=1 +short @10.2.0.1 -x 10.2.0.2 2>&1 ||:) == kd.b8.nz. ]]; then host=127.0.0.1:8000 +else + find_prefix="ssh live.iankelling.org" +fi + +if $find_prefix find /var/icecast -type f | grep .; then + echo "warning: suggest clearing /var/icecast with icrmr or moving files. sleeping for 4 seconds" + sleep 4 fi + pass=$(sed -n 's/ *\([^<]*\).*/\1/p' /p/c/icecast.xml) @@ -360,8 +370,6 @@ if $watch; then rm -f $HOME/.iank-stream-on fi - - ### begin background/development docs ### # zmq vs stdin commands: