Add Messages block.
authorValentin Vidic <Valentin.Vidic@CARNet.hr>
Thu, 16 Feb 2012 12:42:17 +0000 (13:42 +0100)
committerValentin Vidic <Valentin.Vidic@CARNet.hr>
Thu, 16 Feb 2012 12:42:17 +0000 (13:42 +0100)
debian/postinst

index e606fb6..630dce4 100644 (file)
@@ -265,6 +265,13 @@ Job {
   Name = "$HOST"
   Client = $HOST-fd
   JobDefs = "Job_TapeBackup"
+  Messages = messages-$HOST
+}
+
+Messages {
+  Name = messages-$HOST
+  @/etc/bacula/include/messages-defaults.conf
+  mail = $EMAIL = all, !skipped
 }
 EOF
 
@@ -307,6 +314,8 @@ load_config() {
 
     db_get bacula-cn/contact
     CONTACT=$RET
+    EMAIL=${CONTACT#*<}
+    EMAIL=${EMAIL%>*}
 
     PASS_FD=$( random_string )
     PASS_BCONSOLE=$( random_string )