From 3b3c8ae126c476a9e75fd9238a6088f846593570 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Thu, 12 Apr 2018 00:36:07 +0200 Subject: [PATCH] Add startup script. --- ultimate.sh | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100755 ultimate.sh diff --git a/ultimate.sh b/ultimate.sh new file mode 100755 index 0000000..8cff519 --- /dev/null +++ b/ultimate.sh @@ -0,0 +1,47 @@ +#! /bin/bash + +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 +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" + exit +fi + +# Set up BBR +for DEV in $( ip link | grep UP | cut -d" " -f2 | 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 + +# 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 && + ./nageru \ + --va-display /dev/dri/renderD129 \ + -c 6 \ + -r /srv/ultimate/opptak \ + -t ultimate.lua \ + -M ultimate.mapping \ + --midi-mapping=akai_midimix.midimapping \ + --http-x264 \ + --x264-speedcontrol \ + --x264-tune film \ + --http-mux mp4 \ + --http-audio-codec aac \ + --x264-bitrate 4500 \ + --http-audio-bitrate 128 \ + --http-coarse-timebase \ + --quick-cut-keys \ + -m 0,2 -m 1,3 -m 2,4 -m 3,5 -m 4,0 -m 5,1 +) + + #--output-card 4 \ + #--output-buffer-frames 8.0 -- 2.39.2