mirror of
https://github.com/mag37/dockcheck.git
synced 2026-02-14 23:38:15 +01:00
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:
parent
e393a781cf
commit
eb57b63a10
7 changed files with 74 additions and 16 deletions
|
|
@ -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"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue