New option -R and bugfix + cleanup (#236)

* Cleaned up legacy structure
* Add -R flag to skip container recreation after pulling images (#235)
* Added new -R option: Skip Container recreation
---------

Co-authored-by: mag37 <robin.ivehult@gmail.com>
Co-authored-by: NapalmZ <willy.baessato@gmail.com>
This commit is contained in:
mag37 2025-11-01 09:14:49 +01:00 committed by GitHub
parent 8970ee3f20
commit 7ea97d06ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 71 additions and 78 deletions

View file

@ -38,35 +38,15 @@ You can also use the [caronc/apprise-api](https://github.com/caronc/apprise-api)
### Customize the **notify.sh** file.
After you're done with the setup of the container and tried your notifications, you can copy the `notify_apprise.sh` file to `notify.sh` and start editing it.
After you're done with the setup of the container and tried your notifications, you need to follow the configuration setup (explained in detail in the README).
Briefly: Copy `default.config` to `dockcheck.config` then edit it to change the following, `APPRISE_URL` matching your environment:
Comment out/remove the bare metal apprise-command (starting with `apprise -vv -t...`).
Uncomment and edit the `AppriseURL` variable and *curl* line
It should look something like this when curling the API:
```bash
send_notification() {
Updates=("$@")
UpdToString=$( printf "%s\n" "${Updates[@]}" )
FromHost=$(hostname)
printf "\nSending Apprise notification\n"
MessageTitle="$FromHost - updates available."
# Setting the MessageBody variable here.
read -d '\n' MessageBody << __EOF
Containers on $FromHost with updates available:
$UpdToString
__EOF
AppriseURL="http://IP.or.mydomain.tld:8000/notify/apprise"
curl -X POST -F "title=$MessageTitle" -F "body=$MessageBody" -F "tags=all" $AppriseURL
}
NOTIFY_CHANNELS="apprise"
APPRISE_URL="http://apprise.mydomain.tld:1234/notify/apprise"
```
That's all!
That's it!
___
___