Skip to content

Commit

Permalink
Send notification after each completed run
Browse files Browse the repository at this point in the history
Uses apprise sidecar url, if configured, to send an "info" notification
after each run of the update_services loop.

Closes: #95
  • Loading branch information
moschlar committed Nov 20, 2023
1 parent b555040 commit bc229be
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions shepherd
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,11 @@ update_services() {
fi
fi
done
if [[ "$apprise_sidecar_url" != "" ]]; then
title="[Shepherd] Shepherd run completed on $hostname"
body="$(date) Shepherd run has been completed"
curl -X POST -H "Content-Type: application/json" --data "{\"title\": \"$title\", \"body\": \"$body\", \"type\": \"info\"}" "$apprise_sidecar_url"
fi
}

# retrieve registry password from docker secrets or environment, in this order
Expand Down

0 comments on commit bc229be

Please sign in to comment.