mirror of
https://github.com/cimryan/teslausb.git
synced 2026-03-01 04:30:33 +00:00
Silent pushover curl
And fixed a missing fi
This commit is contained in:
@@ -43,13 +43,14 @@ function mount_mountpoint () {
|
|||||||
log "Mounted $mount_point."
|
log "Mounted $mount_point."
|
||||||
if [ -d "/mnt/cam/TeslaCam" ]
|
if [ -d "/mnt/cam/TeslaCam" ]
|
||||||
then
|
then
|
||||||
log "TeslaCam folder exists"
|
log "TeslaCam folder exists"
|
||||||
true
|
true
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
mkdir /mnt/cam/TeslaCam
|
mkdir /mnt/cam/TeslaCam
|
||||||
true
|
true
|
||||||
return
|
return
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
log "Failed to mount $mount_point."
|
log "Failed to mount $mount_point."
|
||||||
false
|
false
|
||||||
|
|||||||
@@ -12,10 +12,13 @@ source /root/.teslaCamPushoverCredentials
|
|||||||
|
|
||||||
if ping -c 1 api.pushover.net &> /dev/null
|
if ping -c 1 api.pushover.net &> /dev/null
|
||||||
then
|
then
|
||||||
if [ ${files_copied} -gt 0 ]
|
if [ $files_copied -gt 0 ]
|
||||||
curl -F "token=$pushover_app_key" \
|
then
|
||||||
|
log "Sending notification that $files_copied were copied."
|
||||||
|
curl -s -F "token=$pushover_app_key" \
|
||||||
-F "user=$pushover_user_key" \
|
-F "user=$pushover_user_key" \
|
||||||
-F "title=Dashcam Copy Complete" \
|
-F "title=Dashcam Copy Complete" \
|
||||||
-F "message=${files_copied} file(s) were copied." \
|
-F "message=${files_copied} file(s) were copied." \
|
||||||
https://api.pushover.net/1/messages
|
https://api.pushover.net/1/messages
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user