Config vars on separate file
authorRuben Rodriguez <ruben@gnu.org>
Fri, 20 Mar 2020 21:29:21 +0000 (17:29 -0400)
committerRuben Rodriguez <ruben@gnu.org>
Fri, 20 Mar 2020 21:29:21 +0000 (17:29 -0400)
config [new file with mode: 0644]
streamdesktop

diff --git a/config b/config
new file mode 100644 (file)
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
+
index 925a4da..c1e5885 100755 (executable)
@@ -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