X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=ffp;fp=ffp;h=f956b0694f016a07a13b1cb55ef09e5cf4a8cf95;hb=989554cab0d0c59d1aab20496ba9550acd17e6e6;hp=851506e8255b81ed98843f6b3865efb16a7fc2d3;hpb=29e7420d5906c1e2068bb7546f5d4148e34e2423;p=distro-setup diff --git a/ffp b/ffp index 851506e..f956b06 100755 --- a/ffp +++ b/ffp @@ -74,10 +74,12 @@ esac -host=live.iankelling.org:8000 -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=127.0.0.1:8000 +host=https://live.iankelling.org:443 +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=http://127.0.0.1:8000 fi opts=( @@ -89,7 +91,7 @@ opts=( -fast -fflags nobuffer -flags low_delay - -i http://$host/fsf$mount_suffix.webm + -i $host/fsf$mount_suffix.webm -autoexit ) ffplay "${opts[@]}"