Add Borg local sync system service and configuration
This commit is contained in:
@@ -26,6 +26,7 @@ log() {
|
||||
# Telegram notification function
|
||||
send_telegram() {
|
||||
local message="$1"
|
||||
local silent="${2:-false}"
|
||||
|
||||
if [ -z "$TELEGRAM_BOT_TOKEN" ] || [ -z "$TELEGRAM_CHAT_ID" ]; then
|
||||
log "Telegram credentials not configured, skipping notification"
|
||||
@@ -36,7 +37,8 @@ send_telegram() {
|
||||
{
|
||||
"chat_id": "$TELEGRAM_CHAT_ID",
|
||||
"text": "$message",
|
||||
"parse_mode": "HTML"
|
||||
"parse_mode": "HTML",
|
||||
"disable_notification": $silent
|
||||
}
|
||||
EOF
|
||||
)
|
||||
@@ -129,7 +131,7 @@ if [ $global_exit -eq 0 ]; then
|
||||
📊 Repository: {{ borg_repo_dir }}
|
||||
🕐 Completed: $(date '+%Y-%m-%d %H:%M:%S')
|
||||
|
||||
All operations completed without errors."
|
||||
All operations completed without errors." "true"
|
||||
elif [ $global_exit -eq 1 ]; then
|
||||
log "Backup completed with warnings (exit code: $global_exit)"
|
||||
send_telegram "⚠️ <b>Borg Backup Warning</b>
|
||||
|
Reference in New Issue
Block a user