summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorst33v <github@f3rr3t.com>2017-01-14 17:10:34 +1100
committerst33v <github@f3rr3t.com>2017-01-14 17:10:34 +1100
commit0b4ca869c97f5be4a7b44bf35753d73b706e3931 (patch)
tree71f5fcb360b324f35af23600f9964e792aad8bfd
parent63408701db30b1f1f10e7420b7579b9e0199ff67 (diff)
added bump.txt to trigger systemd PATH unit at receiving end
-rwxr-xr-xtakepix.sh8
1 files changed, 7 insertions, 1 deletions
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