mirror of
https://github.com/cimryan/teslausb.git
synced 2026-03-01 04:30:33 +00:00
More minor fixes
Fixed rsync user and server being overwritten Added log file outputs for archive-rsync
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#!/bin/bash -eu
|
||||
|
||||
LOG_FILE=/tmp/archive-rsync.log
|
||||
|
||||
function log () {
|
||||
echo "$( date )" >> "$LOG_FILE"
|
||||
echo "$1" >> "$LOG_FILE"
|
||||
@@ -7,7 +9,7 @@ function log () {
|
||||
|
||||
source /root/.teslaCamRsyncConfig
|
||||
|
||||
nfiles=$(rsync -auh --stats /mnt/cam/TeslaCam/saved* $user@$server:$path | awk '/files transferred/{print $NF}')
|
||||
nfiles=$(rsync -auvh --stats --log-file=/tmp/archive-rsync-cmd.log /mnt/cam/TeslaCam/saved* $user@$server:$path | awk '/files transferred/{print $NF}')
|
||||
|
||||
if [ $nfiles > 0 ]
|
||||
then
|
||||
|
||||
Reference in New Issue
Block a user