check_playerproc.sh uses vars-file
This commit is contained in:
parent
137213e5f6
commit
7dc083541e
|
@ -1,7 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
vars="/home/pi/birdcam/vars"
|
||||
# cat vars | grep playerproc | cut -d'=' -f2
|
||||
|
||||
mountpoint="$(cat $vars | grep mountpoint | cut -d'=' -f2)"
|
||||
mountoptions="$(cat $vars | grep mountoptions | cut -d'=' -f2)"
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
#!/bin/sh
|
||||
|
||||
vars="/home/pi/birdcam/vars"
|
||||
|
||||
gpiocmd="$(command -v gpio)"
|
||||
|
||||
if [ -z "$gpiocmd" ]; then
|
||||
echo "Command gpio missing, try to install ..."
|
||||
|
||||
echo "Check internet connection ..."
|
||||
pingserver="raspbian.raspberrypi.org" ### var: pingcheck destination
|
||||
pingserver="$(cat $vars | grep pingserver | cut -d'=' -f2)"
|
||||
if ! ping -q -c1 $pingserver>/dev/null; then
|
||||
echo "No internet connection ..."
|
||||
exit 0
|
||||
|
@ -25,8 +27,8 @@ if [ -z "$gpiocmd" ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
player="vlc" ### var: player process
|
||||
gpiopin_led_b="28" ### var: gpio led blue
|
||||
player="$(cat $vars | grep playerproc | cut -d'=' -f2)"
|
||||
gpiopin_led_b="$(cat $vars | grep gpio_led_b | cut -d'=' -f2)"
|
||||
|
||||
$gpiocmd mode $gpiopin_led_b out
|
||||
$gpiocmd write $gpiopin_led_b 0
|
||||
|
|
Loading…
Reference in New Issue