summaryrefslogtreecommitdiff
path: root/takepix.sh
diff options
context:
space:
mode:
authorst33v <github@f3rr3t.com>2017-01-14 16:28:48 +1100
committerst33v <github@f3rr3t.com>2017-01-14 16:28:48 +1100
commit63408701db30b1f1f10e7420b7579b9e0199ff67 (patch)
tree1570505cb725eebc9a6087a9a3795a461b3b194d /takepix.sh
parentcd2764244ec5554d2851f40ea17f44ef2cb7c88c (diff)
force mixed case hostname to lower
Diffstat (limited to 'takepix.sh')
-rwxr-xr-xtakepix.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/takepix.sh b/takepix.sh
index 9dfac8e..aa319dc 100755
--- a/takepix.sh
+++ b/takepix.sh
@@ -7,15 +7,14 @@
# the following variable assignments, which are shown as examples:
# 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"
+camherder="STAN:/home/path/to/stored/photos"
. picdir.config # source directory name from local config file
picdate=$(date +%Y-%m-%d_%H%M)
thispic=$picdir/$picdate.jpg
-artist=$(hostname)
+artist=$(hostname); artist=${artist,,} # force to lower case
jpgQuality="90"
-camHerderHostname='stan' # Substitute your cam 'controller' hostname or LAN IP address
-# echo thispic = $thispic
+ # echo thispic = $thispic
case ${artist^^} in
@@ -34,7 +33,8 @@ case ${artist^^} in
esac
# Copy pic to STAN, and place it in proper subdirectory (which of course must exist on STAN).
-scp $thispic $camHerder/$artist/.
+artist=${artist,,} # force to lower case
+scp $thispic $camherder/$artist/.
rm $thispic
# Note: we do no image processing on this pi, because it has so little RAM