From 0b4ca869c97f5be4a7b44bf35753d73b706e3931 Mon Sep 17 00:00:00 2001 From: st33v Date: Sat, 14 Jan 2017 17:10:34 +1100 Subject: added bump.txt to trigger systemd PATH unit at receiving end --- takepix.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/takepix.sh b/takepix.sh index aa319dc..a162da1 100755 --- a/takepix.sh +++ b/takepix.sh @@ -8,7 +8,11 @@ # use literal user name. Shell expansions may not work when this script is run by a service! picdir="/path/to/my/photos" # overwritten by sourcing from .picdir.config camherder="STAN:/home/path/to/stored/photos" -. picdir.config # source directory name from local config file +if [ -e picdir.config ]; then + . picdir.config # source directory name from local config file +else echo "picdir.config does not exist"; exit 1 +fi +#echo camherder = $camherder picdate=$(date +%Y-%m-%d_%H%M) thispic=$picdir/$picdate.jpg artist=$(hostname); artist=${artist,,} # force to lower case @@ -35,6 +39,8 @@ esac # Copy pic to STAN, and place it in proper subdirectory (which of course must exist on STAN). artist=${artist,,} # force to lower case scp $thispic $camherder/$artist/. +touch bump.txt # this will trigger the systemd PATH unit at the other end +scp bump.txt $camherder/. rm $thispic # Note: we do no image processing on this pi, because it has so little RAM -- cgit v1.3