mirror of
https://github.com/cimryan/teslausb.git
synced 2026-03-01 04:30:33 +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
|
done
|
||||||
log "Moved $NUM_FILES_MOVED file(s)."
|
log "Moved $NUM_FILES_MOVED file(s)."
|
||||||
|
|
||||||
|
if [ $NUM_FILES_MOVED -gt 0 ]
|
||||||
|
then
|
||||||
/root/bin/send-pushover "$NUM_FILES_MOVED"
|
/root/bin/send-pushover "$NUM_FILES_MOVED"
|
||||||
|
fi
|
||||||
|
|
||||||
log "Finished moving clips to archive."
|
log "Finished moving clips to archive."
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ function log () {
|
|||||||
echo "$1" >> "$LOG_FILE"
|
echo "$1" >> "$LOG_FILE"
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -r "/root/.teslaCamPushoverCredentials" ] && [ $NUM_FILES_MOVED > 0 ]
|
if [ -r "/root/.teslaCamPushoverCredentials" ] && [ $NUM_FILES_MOVED -gt 0 ]
|
||||||
then
|
then
|
||||||
log "Sending Pushover message for moved files."
|
log "Sending Pushover message for moved files."
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user