Skip to content

Commit 82f6442

Browse files
committed
modified apprise-notify
1 parent 6c37e25 commit 82f6442

File tree

2 files changed

+19
-17
lines changed

2 files changed

+19
-17
lines changed

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ ___
3535
- Running docker (duh) and compose, either standalone or plugin.
3636
- [`regclient/regctl`](https://github.com/regclient/regclient) (Licensed under [Apache-2.0 License](http://www.apache.org/licenses/LICENSE-2.0))
3737
- User will be prompted to download `regctl` if not in `PATH` or `PWD`.
38-
- regctl requires `amd64/aarch64` - see [workaround](#workaround-for-non-amd64--aarch64) if other architecture is used.
38+
- regctl requires `amd64/arm64` - see [workaround](#workaround-for-non-amd64--arm64) if other architecture is used.
3939
___
4040

4141

@@ -81,6 +81,7 @@ After the updates are complete, you'll get prompted if you'd like to prune dangl
8181

8282
### :loudspeaker: Notifications
8383
Trigger with the `-i` flag.
84+
Run it scheduled with `-ni` to only get notified when there's updates available!
8485

8586
Use a `notify_X.sh` template file, copy it to `notify.sh`, modify it to your needs!
8687
Current templates:
@@ -89,8 +90,6 @@ Current templates:
8990
- Apprise (with it's [multitude](https://github.com/caronc/apprise#supported-notifications) of notifications)
9091
- both native [caronc/apprise](https://github.com/caronc/apprise) and the standalone [linuxserver/docker-apprise-api](https://github.com/linuxserver/docker-apprise-api)
9192

92-
Run it scheduled with `-ni` to only get notified when there's updates available!
93-
9493
Further additions are welcome - suggestions or PR!
9594
Initiated and first contributed by [yoyoma2](https://github.com/yoyoma2).
9695

@@ -105,8 +104,8 @@ Containers need to be manually stopped, removed and created again to run on the
105104
- Not respecting `--profile` options when re-creating the container.
106105
- Not working well with containers created by Portainer.
107106

108-
### Workaround for non **amd64** / **aarch64**
109-
`regctl` provides binaries for amd64/aarch64, to use on other architecture you could try this workaround.
107+
### Workaround for non **amd64** / **arm64**
108+
`regctl` provides binaries for amd64/arm64, to use on other architecture you could try this workaround.
110109
Run regctl in a contianer wrapped in a shell script. Copied from [regclient/docs/install.md](https://github.com/regclient/regclient/blob/main/docs/install.md):
111110

112111
```sh

notify_apprise.sh

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,36 @@
22
#
33
# Copy/rename this file to notify.sh to enable the notification snippet.
44
# Required receiving services must already be set up.
5-
# Modify to fit your setup - set AppriseURL to your Apprise ip/domain.
5+
# Modify to fit your setup - if API, set AppriseURL to your Apprise ip/domain.
66

77
send_notification() {
88
Updates=("$@")
99
UpdToString=$( printf "%s\n" "${Updates[@]}" )
1010
FromHost=$(hostname)
11-
AppriseURL="http://apprise.mydomain.tld:1234/notify/apprise"
1211

1312
printf "\nSending Apprise notification\n"
1413

1514
MessageTitle="$FromHost - updates available."
1615
# Setting the MessageBody variable here.
17-
read -d '\n' MessageBody << EOF
16+
read -d '\n' MessageBody << __EOF
1817
Containers on $FromHost with updates available:
1918
2019
$UpdToString
2120
22-
EOF
21+
__EOF
22+
23+
# Modify to fit your setup:
24+
apprise -vv -t "$MessageTitle" -b "$MessageBody" \
25+
mailto://myemail:[email protected] \
26+
mastodons://{token}@{host} \
27+
pbul://o.gn5kj6nfhv736I7jC3cj3QLRiyhgl98b \
28+
tgram://{bot_token}/{chat_id}/
29+
30+
### If you use the Apprise-API - Comment out the apprise command above.
31+
### Uncomment the AppriseURL and the curl-line below:
32+
# AppriseURL="http://apprise.mydomain.tld:1234/notify/apprise"
33+
# curl -X POST -F "title=$MessageTitle" -F "body=$MessageBody" -F "tags=all" $AppriseURL
2334

24-
curl -X POST -F "title=$MessageTitle" -F "body=$MessageBody" -F "tags=all" $AppriseURL
2535
}
2636

2737

28-
# If you run apprise bare metal on the same machine as dockcheck
29-
# you can just comment out the AppriseURL and swap the curl line
30-
# with something ike this:
31-
#
32-
# apprise -vv -t "$MessageTitle" -b "$MessageBody" \
33-
# 'mailto://myemail:[email protected]' \
34-
# 'pbul://o.gn5kj6nfhv736I7jC3cj3QLRiyhgl98b'

0 commit comments

Comments
 (0)