]> git.sesse.net Git - ultimatescore/blobdiff - ultimate.sh
Renumber post-Wireguard.
[ultimatescore] / ultimate.sh
index 5ef112e3c0ad5de38a5bbd72d1065ec5ec9f2dbc..5d81cfc9572f406d41e230feae266ec0c7a0c6b8 100755 (executable)
@@ -5,14 +5,13 @@ if ! [ -d /srv/ultimate/opptak ]; then
        sudo mount /dev/disk/by-uuid/af9070b1-ba86-4240-83b3-8b866b86a46b /srv/ultimate
 fi
 
-if ! pidof ssh > /dev/null; then
-       echo "Set up SSH forwarding forwarding before running this script:"
-       echo "  ssh -R 9095:127.0.0.1:9095 stream@pannekake.samfundet.no"
+if ! ping -c 1 -t 1 10.42.1.1 >/dev/null; then
+       echo "Wireguard tunnel is not working (cannot ping 10.42.1.1), please fix before starting streaming."
        exit
 fi
 
 # Set up BBR
-for DEV in $( ip link | grep UP | cut -d" " -f2 | cut -d: -f1 | grep -v lo ); do
+for DEV in $( ip link | grep UP | cut -d" " -f2 | cut -d: -f1 | cut -d@ -f1 | grep -v lo ); do
        sudo tc qdisc add root dev $DEV fq
 done
 echo bbr | sudo tee /proc/sys/net/ipv4/tcp_congestion_control