autostart_stream.sh 259 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash

function autoStartStreamIfTTY() {
    isTTY=$(tty | awk '{if ($0=="/dev/tty1") {print "true"}else{print "false"}}')

    if [ $isTTY == "true" ]; then
        printf "Starting streaming\n"
        ./start_stream.sh
    fi
}

autoStartStreamIfTTY