Separate files into those used for setup and those used at runtime.

Files used for both will go in the run tree.
This commit is contained in:
cimryan
2018-10-24 20:55:29 -07:00
parent ef10b2ec67
commit e875763e58
27 changed files with 0 additions and 0 deletions

21
run/send-pushover Normal file
View File

@@ -0,0 +1,21 @@
#!/bin/bash -eu
NUM_FILES_MOVED="$1"
function log () {
echo "$( date )" >> "$LOG_FILE"
echo "$1" >> "$LOG_FILE"
}
if [ -r "/root/.teslaCamPushoverCredentials" ] && [ $NUM_FILES_MOVED > 0]
then
log "Sending Pushover message for moved files."
source /root/.teslaCamPushoverCredentials
curl -F "token=$pushover_app_key" \
-F "user=$pushover_user_key" \
-F "title=Dashcam Copy Complete" \
-F "message=$NUM_FILES_MOVED file(s) were copied." \
https://api.pushover.net/1/messages
fi