From de06f166ef5d7d3690c72c98e53b99b74595c251 Mon Sep 17 00:00:00 2001 From: st33v Date: Sun, 25 Sep 2016 17:29:04 +1000 Subject: add sendpix.sh and fixes to getpix timer --- sendpix.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 sendpix.sh (limited to 'sendpix.sh') diff --git a/sendpix.sh b/sendpix.sh new file mode 100755 index 0000000..e597d6f --- /dev/null +++ b/sendpix.sh @@ -0,0 +1,19 @@ +#!/usr/bin/bash +# SJP 22 Feb 2016 +# +# Send (copy) webcam pix from master repository (on the LAN) to remote computer with web server. +# This script is to be called from a systemd timer. + +# The name of the system that has the webcamn attached. +# While this is presently hard-coded, we can abstract this for laster iterations when there are more than one cam. +campi="neatherd" +# remote server +wanWebServer="f3rr3t.com" + +# select the most recent pic +newpic=$(ls -t ~/cams/$campi/ | head -1 ) + +scp /home/st33v/cams/$campi/$newpic $wanWebServer:/home/st33v/farm/cam/$campi/. + + +#exit(0) # force succes exit code for fussy systemd -- cgit v1.3