public
nobgit
read
NobMail
Based on mailcow: dockerized
Languages
Repository composition by tracked source files.
PHP
49%
JavaScript
35%
HTML
9%
CSS
4%
Shell
2%
Python
1%
Lua
0%
Perl
0%
Ruby
0%
SCSS
0%
Create file
Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git
Commit
[Watchdog] add curl verbose & use | as sed delimiter
218ba695
data/Dockerfiles/watchdog/watchdog.sh | 6 ++++--
docker-compose.yml | 2 +-
2 files changed, 5 insertions(+), 3 deletions(-)
Diff
diff --git a/data/Dockerfiles/watchdog/watchdog.sh b/data/Dockerfiles/watchdog/watchdog.sh
index 2b8ff78f..1e0d6813 100755
--- a/data/Dockerfiles/watchdog/watchdog.sh
+++ b/data/Dockerfiles/watchdog/watchdog.sh
@@ -19,9 +19,11 @@ fi
if [[ "${WATCHDOG_VERBOSE}" =~ ^([yY][eE][sS]|[yY])+$ ]]; then
SMTP_VERBOSE="--verbose"
+ CURL_VERBOSE="--verbose"
set -xv
else
SMTP_VERBOSE=""
+ CURL_VERBOSE=""
exec 2>/dev/null
fi
@@ -168,10 +170,10 @@ function notify_error() {
fi
# Replace subject and body placeholders
- WEBHOOK_BODY=$(echo ${WATCHDOG_NOTIFY_WEBHOOK_BODY} | sed "s/\$SUBJECT\|\${SUBJECT}/$SUBJECT/g" | sed "s/\$BODY\|\${BODY}/$BODY/")
+ WEBHOOK_BODY=$(echo ${WATCHDOG_NOTIFY_WEBHOOK_BODY} | sed "s|\$SUBJECT\|\${SUBJECT}|$SUBJECT|g" | sed "s|\$BODY\|\${BODY}|$BODY|")
# POST to webhook
- curl -X POST -H "Content-Type: application/json" -d "${WEBHOOK_BODY}" ${WATCHDOG_NOTIFY_WEBHOOK}
+ curl -X POST -H "Content-Type: application/json" ${CURL_VERBOSE} -d "${WEBHOOK_BODY}" ${WATCHDOG_NOTIFY_WEBHOOK}
log_msg "Sent notification using webhook"
fi
diff --git a/docker-compose.yml b/docker-compose.yml
index 61e7a78e..8ab7bb8c 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -448,7 +448,7 @@ services:
- /lib/modules:/lib/modules:ro
watchdog-mailcow:
- image: mailcow/watchdog:1.97
+ image: mailcow/watchdog:1.99
dns:
- ${IPV4_NETWORK:-172.22.1}.254
tmpfs: