Made more informative

Output to setup log
Easier to read main log function
Add LED flashes for stage setup / failure
Move all script downloads to frontend setup script
This commit is contained in:
Richard Goodwin
2018-10-21 11:02:49 -05:00
parent 4b761d34e0
commit 52ad4b21ad
6 changed files with 185 additions and 91 deletions

View File

@@ -1,14 +1,18 @@
#!/bin/bash -eu
LOGFILE=/tmp/archiveloop.log
function log () {
echo "$( date )" >> "$LOG_FILE"
echo "$1" >> "$LOG_FILE"
echo "$( date ) : $1" >> "$LOG_FILE"
}
source /root/.teslaCamPushoverCredentials
curl -F "token=$pushover_app_key" \
-F "user=$pushover_user_key" \
-F "title=Dashcam Copy Complete" \
-F "message=$1 file(s) were copied." \
https://api.pushover.net/1/messages
if ping -c 1 api.pushover.net &> /dev/null
then
curl -F "token=$pushover_app_key" \
-F "user=$pushover_user_key" \
-F "title=Dashcam Copy Complete" \
-F "message=$1 file(s) were copied." \
https://api.pushover.net/1/messages
fi