modifications for external vars-file
This commit is contained in:
parent
1a9cc846b5
commit
a97fdb315a
6
vars
6
vars
|
@ -6,6 +6,9 @@ playerpackage=vlc
|
||||||
randomsh=randomvideo.sh
|
randomsh=randomvideo.sh
|
||||||
pingserver=raspbian.raspberrypi.org
|
pingserver=raspbian.raspberrypi.org
|
||||||
usbdevice=sda1
|
usbdevice=sda1
|
||||||
|
camparamr=random
|
||||||
|
camparam1=birdcam1
|
||||||
|
camparam2=birdcam2
|
||||||
|
|
||||||
# automount.sh
|
# automount.sh
|
||||||
mountpoint=/media/video
|
mountpoint=/media/video
|
||||||
|
@ -22,9 +25,6 @@ camerash=/home/pi/birdcam/view_birdcam.sh
|
||||||
buttonpolling=0.05
|
buttonpolling=0.05
|
||||||
buttontimeout=1
|
buttontimeout=1
|
||||||
countermax=1200
|
countermax=1200
|
||||||
camparamr=random
|
|
||||||
camparam1=birdcam1
|
|
||||||
camparam2=birdcam2
|
|
||||||
|
|
||||||
# randomvideo.sh
|
# randomvideo.sh
|
||||||
folderext=/media/video/video
|
folderext=/media/video/video
|
||||||
|
|
|
@ -46,17 +46,17 @@ if [ -n "$(pgrep $randomvideoproc)" ]; then
|
||||||
pkill $randomvideoproc
|
pkill $randomvideoproc
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$1" = "random" ]; then
|
if [ "$1" = "$(cat $vars | grep camparamr | cut -d'=' -f2)" ]; then
|
||||||
$randomvideosh
|
$randomvideosh
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
streamurl="rtsp://$1:554/user=admin&password=&channel=1&stream=0.sdp?real_stream"
|
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""
|
$player_path $playerparam ""$streamurl""
|
||||||
|
|
||||||
elif [ "$1" = "birdcam2" ]; then
|
elif [ "$1" = "$(cat $vars | grep camparam2 | cut -d'=' -f2)" ]; then
|
||||||
$player_path $playerparam ""$streamurl""
|
$player_path $playerparam ""$streamurl""
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue