From a84d45498bd861c9225080232948a99c2e317bb8 Mon Sep 17 00:00:00 2001 From: Reinhard Tartler Date: Thu, 2 Apr 2009 13:58:11 +0200 Subject: Import upstream version 0.11~rc3~r2491 --- bin/bbackupd/win32/NotifySysAdmin.vbs | 62 ++++++++++++++++++++++------------- bin/bbackupd/win32/bbackupd.conf | 2 +- 2 files changed, 41 insertions(+), 23 deletions(-) (limited to 'bin/bbackupd/win32') diff --git a/bin/bbackupd/win32/NotifySysAdmin.vbs b/bin/bbackupd/win32/NotifySysAdmin.vbs index 49082887..712d92da 100644 --- a/bin/bbackupd/win32/NotifySysAdmin.vbs +++ b/bin/bbackupd/win32/NotifySysAdmin.vbs @@ -10,44 +10,62 @@ Dim smtpserver Set WshNet = CreateObject("WScript.Network") hostname = WshNet.ComputerName -account = "0a1" +account = "0x1" from = "boxbackup@" & hostname sendto = "admin@example.com" -subjtmpl = "BACKUP PROBLEM on host " & hostname smtpserver = "smtp.example.com" +subjtmpl = "BACKUP PROBLEM on host " & hostname Set args = WScript.Arguments If args(0) = "store-full" Then subject = subjtmpl & " (store full)" - body = "The store account for "&hostname&" is full." & vbCrLf & vbCrLf & _ - "=============================" & vbCrLf & _ - "FILES ARE NOT BEING BACKED UP" & vbCrLf & _ - "=============================" & vbCrLf & vbCrLf & _ - "Please adjust the limits on account "&account&" on server "&hostname&"." _ - & vbCrLf + body = "The store account for "&hostname&" is full." & vbCrLf & _ + vbCrLf & _ + "=============================" & vbCrLf & _ + "FILES ARE NOT BEING BACKED UP" & vbCrLf & _ + "=============================" & vbCrLf & _ + vbCrLf & _ + "Please adjust the limits on account "&account&" on server "&hostname&"." _ + & vbCrLf SendMail from,sendto,subject,body ElseIf args(0) = "read-error" Then subject = subjtmpl & " (read errors)" - body = "Errors occured reading some files or directories for backup on "&hostname&"." _ - & vbCrLf & vbCrLf & _ - "===================================" & vbCrLf & _ - "THESE FILES ARE NOT BEING BACKED UP" & vbCrLf & _ - "===================================" & vbCrLf & vbCrLf & _ - "Check the logs on "&hostname&" for the files and directories which caused" & _ - "these errors, and take appropraite action." & vbCrLf & vbCrLf & _ - "Other files are being backed up." & vbCrLf + body = "Errors occurred reading some files or directories " & _ + "for backup on " & hostname & "." & vbCrLf & _ + vbCrLf & _ + "===================================" & vbCrLf & _ + "THESE FILES ARE NOT BEING BACKED UP" & vbCrLf & _ + "===================================" & vbCrLf & vbCrLf & _ + "Check the logs on "&hostname&" for the files and " & _ + "directories which caused" & vbCrLf & _ + "these errors, and take appropriate action." & vbCrLf & _ + vbCrLf & _ + "Other files are being backed up." & vbCrLf + SendMail from,sendto,subject,body +ElseIf args(0) = "backup-error" Then + subject = subjtmpl & " (read errors)" + body = "An error occurred during the backup on "&hostname&"." _ + & vbCrLf & vbCrLf & _ + "==========================" & vbCrLf & _ + "FILES MAY NOT BE BACKED UP" & vbCrLf & _ + "==========================" & vbCrLf & _ + vbCrLf & _ + "Check the logs on "&hostname&" for more " & _ + "information about the error, " & vbCrLf & _ + "and take appropriate action." & vbCrLf SendMail from,sendto,subject,body -ElseIf args(0) = "backup-start" Or args(0) = "backup-finish" Then +ElseIf args(0) = "backup-start" Or args(0) = "backup-finish" _ + Or args(0) = "backup-ok" Then ' do nothing for these messages by default Else subject = subjtmpl & " (unknown)" body = "The backup daemon on "&hostname&" reported an unknown error." _ - & vbCrLf & vbCrLf & _ - "==========================" & vbCrLf & _ - "FILES MAY NOT BE BACKED UP" & vbCrLf & _ - "==========================" & vbCrLf & vbCrLf & _ - "Please check the logs on "&hostname&"." & vbCrLf + & vbCrLf & vbCrLf & _ + "==========================" & vbCrLf & _ + "FILES MAY NOT BE BACKED UP" & vbCrLf & _ + "==========================" & vbCrLf & vbCrLf & _ + "Please check the logs on "&hostname&"." & vbCrLf SendMail from,sendto,subject,body End If diff --git a/bin/bbackupd/win32/bbackupd.conf b/bin/bbackupd/win32/bbackupd.conf index 6c987f7d..b0793b29 100644 --- a/bin/bbackupd/win32/bbackupd.conf +++ b/bin/bbackupd/win32/bbackupd.conf @@ -173,7 +173,7 @@ Server # If a directive ends in Regex, then it is a regular expression rather than a # explicit full pathname. See: # -# http://bbdev.fluffy.co.uk/trac/wiki/Win32Regex +# http://www.boxbackup.org/trac/wiki/Win32Regex # # for more information about regular expressions on Windows. # -- cgit v1.2.3