]> git.sesse.net Git - ultimatescore/blobdiff - ultimate.sh
Adjust for the extra Studio 2 we inserted.
[ultimatescore] / ultimate.sh
index 0a39e6e25f2b8493739cfb98dc5e8413b9be0812..a06a1d31e17e041cf1b21a68cb361040b4489270 100755 (executable)
@@ -2,32 +2,35 @@
 
 if ! [ -d /srv/ultimate/opptak ]; then
 #      sudo mount /dev/sda1 /srv/ultimate
-       sudo mount /dev/disk/by-uuid/5ba6626a-7539-4b43-a9e1-b13243f1abdf /srv/ultimate
+       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
 
+# Make sure CSS is up-to-date
+sass score.scss score.css
+
 # Start the client
 if ! pidof ultimatescore > /dev/null; then
        urxvt -e /home/sesse/dev/ultimatescore/client/ultimatescore &
 fi
 
 # Start Nageru
-( cd /home/sesse/dev/nageru &&
+( cd /home/sesse/dev/nageru/obj &&
  ./nageru \
        -c 6 \
-       -t ultimate.lua \
-       -M ultimate.mapping \
+       -t /home/sesse/dev/ultimatescore/nageru/ultimate.lua \
+       -M /home/sesse/dev/ultimatescore/nageru/ultimate.mapping \
+       -r /srv/ultimate/opptak \
        --midi-mapping=akai_midimix.midimapping \
        --http-x264 \
        --x264-speedcontrol \
@@ -37,10 +40,11 @@ fi
        --x264-bitrate 4500 \
        --http-audio-bitrate 128 \
        --quick-cut-keys \
-       -m 0,2 -m 1,3 -m 2,4 -m 3,5 -m 4,0 -m 5,1
+       --mjpeg-export-cards=1-5 \
+       -m 0,1 -m 1,2 -m 2,3 -m 3,4 -m 4,5 -m 5,0
+       #-m 0,2 -m 1,3 -m 2,4 -m 3,5 -m 4,0 -m 5,1 \
 )
 
-       #-r /srv/ultimate/opptak \
 
        #--output-card 4 \
        #--output-buffer-frames 8.0