Skip to content

Commit ca2f04c

Browse files
committed
Release 4.0.17 - See CHANGELOG.md
1 parent dfa94ec commit ca2f04c

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 4.0.17 2023-11-17 <dave at tiredofit dot ca>
2+
3+
### Changed
4+
- Provide more details when notifying via instant messages
5+
6+
17
## 4.0.16 2023-11-17 <dave at tiredofit dot ca>
28

39
### Changed

install/assets/functions/10-db-backup

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1370,13 +1370,13 @@ notify() {
13701370
for mail_recipient in $mail_recipients ; do
13711371
cat <<EOF | msmtp -t "${mail_recipient}" -c /etc/msmtprc
13721372
To: ${mail_recipient}
1373-
Subject: [db-backup] [${DOMAIN}] ${3}
1373+
Subject: [db-backup] ${4}
13741374

13751375
Time: ${1}
13761376
Log File: {2}
13771377
Error Code: ${3}
13781378

1379-
${4}
1379+
${5}
13801380
EOF
13811381
done
13821382
fi
@@ -1392,7 +1392,7 @@ EOF
13921392
if [ -z "${MATTERMOST_WEBHOOK_URL}" ] ; then write_log error "[notifications] No MATTERMOST_WEBHOOK_URL variable set - Skipping sending Mattermost notifications" ; skip_mattermost=true ; fi
13931393
if var_nottrue "${skip_mattermost}" ; then
13941394
emoji=":bomb:"
1395-
message="*[db-backup] ${3}*\n${4}\n*Timestamp:* ${1}\n*Logfile:* ${2}\n*Error Code: ${3}"
1395+
message="*[db-backup] ${4}*\n${5}\n*Timestamp:* ${1}\n*Logfile:* ${2}\n*Error Code: ${3}"
13961396
mattermost_recipients=$(echo "${MATTERMOST_RECIPIENT}" | tr "," "\n")
13971397
for mattermost_recipient in $mattermost_recipients ; do
13981398
payload="payload={\"channel\": \"${mattermost_recipient//\"/\\\"}\", \"username\": \"${MATTERMOST_USERNAME//\"/\\\"}\", \"text\": \"${message//\"/\\\"}\", \"icon_emoji\": \"${emoji}\"}"
@@ -1417,7 +1417,7 @@ EOF
14171417
for matrix_room in $matrix_rooms ; do
14181418
curl \
14191419
-XPOST \
1420-
-d "{\"msgtype\":\"m.text\", \"body\":\"*[db-backup] ${3}*\n${4}\n*Timestamp:* ${1}\n*Logfile:* ${2}\n*Error Code: ${3}*\"}" \
1420+
-d "{\"msgtype\":\"m.text\", \"body\":\"*[db-backup] ${4}*\n${5}\n*Timestamp:* ${1}\n*Logfile:* ${2}\n*Error Code: ${3}*\"}" \
14211421
"${MATRIX_HOST}/_matrix/client/r0/rooms/${matrix_room}/send/m.room.message?access_token=${MATRIX_ACCESS_TOKEN}"
14221422
done
14231423
fi
@@ -1433,7 +1433,7 @@ EOF
14331433
if [ -z "${ROCKETCHAT_WEBHOOK_URL}" ] ; then write_log error "[notifications] No ROCKETCHAT_WEBHOOK_URL variable set - Skipping sending Rocket.Chat notifications" ; skip_rocketchat=true ; fi
14341434
if var_nottrue "${skip_rocketchat}" ; then
14351435
emoji=":bomb:"
1436-
message="*[db-backup] ${3}*\n${4}\n*Timestamp:* ${1}\n*Logfile:* ${2}\n*Error Code: ${3}"
1436+
message="*[db-backup] ${4}*\n${5}\n*Timestamp:* ${1}\n*Logfile:* ${2}\n*Error Code: ${3}"
14371437
rocketchat_recipients=$(echo "${ROCKETCHAT_RECIPIENT}" | tr "," "\n")
14381438
for rocketchat_recipient in $rocketchat_recipients ; do
14391439
payload="payload={\"channel\": \"${rocketchat_recipient//\"/\\\"}\", \"username\": \"${ROCKETCHAT_USERNAME//\"/\\\"}\", \"text\": \"${message//\"/\\\"}\", \"icon_emoji\": \"${emoji}\"}"

0 commit comments

Comments
 (0)