mirror of
https://github.com/cimryan/teslausb.git
synced 2026-02-28 20:20:32 +00:00
Extra checks for whether to send push
This commit is contained in:
@@ -19,6 +19,9 @@ for file_name in "$CAM_MOUNT"/TeslaCam/saved*; do
|
||||
done
|
||||
log "Moved $NUM_FILES_MOVED file(s)."
|
||||
|
||||
if [ $NUM_FILES_MOVED -gt 0 ]
|
||||
then
|
||||
/root/bin/send-pushover "$NUM_FILES_MOVED"
|
||||
fi
|
||||
|
||||
log "Finished moving clips to archive."
|
||||
|
||||
@@ -7,7 +7,7 @@ function log () {
|
||||
echo "$1" >> "$LOG_FILE"
|
||||
}
|
||||
|
||||
if [ -r "/root/.teslaCamPushoverCredentials" ] && [ $NUM_FILES_MOVED > 0 ]
|
||||
if [ -r "/root/.teslaCamPushoverCredentials" ] && [ $NUM_FILES_MOVED -gt 0 ]
|
||||
then
|
||||
log "Sending Pushover message for moved files."
|
||||
|
||||
|
||||
Reference in New Issue
Block a user