diff options
| -rwxr-xr-x | getpix.sh | 7 | ||||
| -rwxr-xr-x | sendpix.sh | 19 |
2 files changed, 5 insertions, 21 deletions
@@ -5,6 +5,7 @@ ########### Constants ################## campi="neatherd" # hard-code source hostname for the moment +wanWebServer="f3rr3t.com" sourcedir="/home/st33v/pix" # where the image is on the source computer (i.e. $campi) thisdir="/home/st33v/cams" # this directory (on this computer) threshold="2000" # minimum value of average pixel brightness. Tests if pic is too dark @@ -53,7 +54,9 @@ fi convert ${newpic} -unsharp 1.5x1+0.7+0.02 temp.jpg convert temp.jpg -resize 33% -quality 70 ${newpic} rm temp.jpg - -. ~/cams/sendpix.sh + +scp /home/st33v/cams/$campi/$newpic $wanWebServer:/home/st33v/farm/cam/$campi/. + +#. ~/cams/sendpix.sh #exit(0) # force success exit code for fussy systemd diff --git a/sendpix.sh b/sendpix.sh deleted file mode 100755 index e597d6f..0000000 --- a/sendpix.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/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 |
