permission checks, dsm readme, markdown (#171)

* added check for docker socket permissions

* added sudo-check to pkg-manager

* corrected variable typo and some printf colors

* and newline..

* DSM extra readme added

* final tweaks, DSM readme

* added markdown to readme

* added markdown support to telegram template

* removed container specification from compose up -d
This will ensure any dependant containers in the same stack will
restart, others will be untouched.

* Rearranged where the url enrichment happens
This commit is contained in:
mag37 2025-05-02 21:40:24 +02:00 committed by GitHub
parent e393a781cf
commit eb57b63a10
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 74 additions and 16 deletions

View file

@ -1,5 +1,5 @@
### DISCLAIMER: This is a third party addition to dockcheck - best effort testing.
NOTIFY_TELEGRAM_VERSION="v0.1"
NOTIFY_TELEGRAM_VERSION="v0.2"
#
# Copy/rename this file to notify.sh to enable the notification snippet.
# Required receiving services must already be set up.
@ -8,12 +8,19 @@ NOTIFY_TELEGRAM_VERSION="v0.1"
FromHost=$(hostname)
trigger_notification() {
if [[ "$PrintMarkdownURL" == true ]]; then
ParseMode="Markdown"
else
ParseMode="HTML"
fi
# Modify to fit your setup:
TelegramToken="Your Telegram token here"
TelegramChatId="Your Telegram ChatId here"
TelegramUrl="https://api.telegram.org/bot$TelegramToken"
TelegramTopicID=12345678 ## Set to 0 if not using specific topic within chat
TelegramData="{\"chat_id\":\"$TelegramChatId\",\"text\":\"$MessageBody\",\"message_thread_id\":\"$TelegramTopicID\",\"disable_notification\": false}"
TelegramData="{\"chat_id\":\"$TelegramChatId\",\"text\":\"$MessageBody\",\"message_thread_id\":\"$TelegramTopicID\",\"disable_notification\": false,\"parse_mode\": \"$ParseMode\",\"disable_web_page_preview\": true}"
curl -sS -o /dev/null --fail -X POST "$TelegramUrl/sendMessage" -H 'Content-Type: application/json' -d "$TelegramData"
}