-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsuccess.sh
More file actions
37 lines (36 loc) · 1.05 KB
/
success.sh
File metadata and controls
37 lines (36 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env bash
set -euo pipefail
# generate the error embed
generate_success_embed() {
cat <<EOF
{
"avatar_url": "https://raw.githubusercontent.com/dumbdogdiner/restic-scripts/master/assets/restic.png",
"username": "Restic Backup Logs",
"embeds": [
{
"title": "Backup Successful",
"description": "The backup completed without errors. UwU~!",
"url": "https://discordapp.com",
"color": 5832536,
"timestamp": "$OUTPUT_DATE",
"footer": {
"text": "Backup performed at"
},
"fields": [
{
"name": "Restic Logs",
"value": "\`\`\`$RESTIC_LOGS\`\`\`"
},
{
"name": "Repository Size",
"value": "$OUTPUT_SIZE"
}
],
"thumbnail": {
"url": "https://raw.githubusercontent.com/dumbdogdiner/restic-scripts/master/assets/success.png"
}
}
]
}
EOF
}