From 23f844fca64e133390a43ea7a0a24101061f2b85 Mon Sep 17 00:00:00 2001 From: Ruben Rodriguez Date: Fri, 20 Mar 2020 17:29:21 -0400 Subject: [PATCH] Config vars on separate file --- config | 14 ++++++++++++++ streamdesktop | 18 +++++------------- 2 files changed, 19 insertions(+), 13 deletions(-) create mode 100644 config diff --git a/config b/config new file mode 100644 index 0000000..c01d63b --- /dev/null +++ b/config @@ -0,0 +1,14 @@ +# Server connection settings +SERVER=my.icecast2server.org +PORT=80 # port to stream to +PASSWORD=hackme + +# Stream settings +BITRATE=1000000 # Bitrate of the video, in bps +SOUNDQUALITY=0.4 # OGG compression quality, from 0 to 1 +FRAMERATE=20 # frames per second +SHOWPOINTER="true" # show or hide the mouse pointer +# Width and height are upper limits. Video will not be upscaled or stretched, it would be proportionally downscaled to fit the WIDTH and HEIGHT dimensions +WIDTH=1280 +HEIGHT=720 + diff --git a/streamdesktop b/streamdesktop index 925a4da..c1e5885 100755 --- a/streamdesktop +++ b/streamdesktop @@ -30,19 +30,11 @@ fi # Server side dependencies: icecast2 -# Server connection settings -SERVER=my.icecast2server.org -PORT=80 # port to stream to -PASSWORD=hackme - -# Stream settings -BITRATE=1000000 # Bitrate of the video, in bps -SOUNDQUALITY=0.4 # OGG compression quality, from 0 to 1 -FRAMERATE=20 # frames per second -SHOWPOINTER="true" # show or hide the mouse pointer -# Width and height are upper limits. Video will not be upscaled or stretched, it would be proportionally downscaled to fit the WIDTH and HEIGHT dimensions -WIDTH=1280 -HEIGHT=720 +. config +if [ "$PASSWORD" = "hackme" ]; then + echo Edit ./config to set up your server, password, and other parameters + exit 1 +fi DATE=$(date +%Y-%m-%d-%H_%M_%S) MOUNT=$1 -- 2.25.1