modifications for external vars-file

master
mmaster 2021-09-23 23:03:44 +02:00
parent 1a9cc846b5
commit a97fdb315a
2 changed files with 6 additions and 6 deletions

6
vars
View File

@ -6,6 +6,9 @@ playerpackage=vlc
randomsh=randomvideo.sh
pingserver=raspbian.raspberrypi.org
usbdevice=sda1
camparamr=random
camparam1=birdcam1
camparam2=birdcam2
# automount.sh
mountpoint=/media/video
@ -22,9 +25,6 @@ camerash=/home/pi/birdcam/view_birdcam.sh
buttonpolling=0.05
buttontimeout=1
countermax=1200
camparamr=random
camparam1=birdcam1
camparam2=birdcam2
# randomvideo.sh
folderext=/media/video/video

View File

@ -46,17 +46,17 @@ if [ -n "$(pgrep $randomvideoproc)" ]; then
pkill $randomvideoproc
fi
if [ "$1" = "random" ]; then
if [ "$1" = "$(cat $vars | grep camparamr | cut -d'=' -f2)" ]; then
$randomvideosh
exit 0
fi
streamurl="rtsp://$1:554/user=admin&password=&channel=1&stream=0.sdp?real_stream"
if [ "$1" = "birdcam1" ]; then
if [ "$1" = "$(cat $vars | grep camparam1 | cut -d'=' -f2)" ]; then
$player_path $playerparam ""$streamurl""
elif [ "$1" = "birdcam2" ]; then
elif [ "$1" = "$(cat $vars | grep camparam2 | cut -d'=' -f2)" ]; then
$player_path $playerparam ""$streamurl""
else