diff --git a/windows_archive/archive-teslacam-clips b/windows_archive/archive-teslacam-clips index 5349666..a41985f 100644 --- a/windows_archive/archive-teslacam-clips +++ b/windows_archive/archive-teslacam-clips @@ -43,13 +43,14 @@ function mount_mountpoint () { log "Mounted $mount_point." if [ -d "/mnt/cam/TeslaCam" ] then - log "TeslaCam folder exists" - true - return - else - mkdir /mnt/cam/TeslaCam - true - return + log "TeslaCam folder exists" + true + return + else + mkdir /mnt/cam/TeslaCam + true + return + fi else log "Failed to mount $mount_point." false @@ -69,7 +70,7 @@ function ensure_mountpoint_is_mounted () { else mount_mountpoint "$mount_point" fi -} +} function ensure_mountpoint_is_mounted_with_retry () { retry ensure_mountpoint_is_mounted "$1" diff --git a/windows_archive/send-pushover b/windows_archive/send-pushover index cd92f3e..db2d4fe 100644 --- a/windows_archive/send-pushover +++ b/windows_archive/send-pushover @@ -12,10 +12,13 @@ source /root/.teslaCamPushoverCredentials if ping -c 1 api.pushover.net &> /dev/null then - if [ ${files_copied} -gt 0 ] - curl -F "token=$pushover_app_key" \ + if [ $files_copied -gt 0 ] + then + log "Sending notification that $files_copied were copied." + curl -s -F "token=$pushover_app_key" \ -F "user=$pushover_user_key" \ -F "title=Dashcam Copy Complete" \ -F "message=${files_copied} file(s) were copied." \ https://api.pushover.net/1/messages + fi fi