Improvement to config handling
[streamdesktop.git] / streamdesktop
index 925a4da30890908f48e328ffd115f87da747f806..7e719e095d377a3ea1b00206f7c948c9a06bb4fc 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 ! [ -f config ]; then
+  echo Copy ./config.example into ./config, and edit it to set up your server, password, and other parameters
+  exit 1
+fi
 
 DATE=$(date +%Y-%m-%d-%H_%M_%S)
 MOUNT=$1