distro specific fixes
[distro-setup] / ffp
diff --git a/ffp b/ffp
index 851506e8255b81ed98843f6b3865efb16a7fc2d3..f956b0694f016a07a13b1cb55ef09e5cf4a8cf95 100755 (executable)
--- 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[@]}"