X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=debian%2Fpostinst;h=97d8ac55c859af1ec2e00ad3d31cd20823efd96c;hb=refs%2Fheads%2Fsqueeze;hp=1a1fbb6d0eeec3b55a942334969014dc71bce10a;hpb=fc072bdf2d121161fdafd31559f1d63049b177c3;p=bacula-cn.git diff --git a/debian/postinst b/debian/postinst index 1a1fbb6..97d8ac5 100644 --- a/debian/postinst +++ b/debian/postinst @@ -259,34 +259,19 @@ Console { Password = "$PASS_BCONSOLE" # password for bconsole(8) JobACL = $HOST, RestoreFiles ClientACL = $HOST-fd - StorageACL = $HOST-stor - PoolACL = $HOST-pool, tmp -} - -Pool { - Name = $HOST-pool - @/etc/bacula/include/pool-default.conf - Label Format = ${HOST}_ -} - -Storage { - Name = $HOST-stor - @/etc/bacula/include/storage-default.conf - Device = file_$HOST - Media Type = media_$HOST } Job { Name = "$HOST" Client = $HOST-fd - JobDefs = "Job_SysBackup" - Pool = $HOST-pool - Storage = $HOST-stor - RunScript { - RunsWhen=After - RunsOnClient=No - Console = "purge volume action=all storage=$HOST-stor pool=$HOST-pool" - } + JobDefs = "Job_TapeBackup" + Messages = messages-$HOST +} + +Messages { + Name = messages-$HOST + @/etc/bacula/include/messages-defaults.conf + mail = $EMAIL = all, !skipped } EOF @@ -309,7 +294,7 @@ EOF # Try to send it if [ -x "`which sendmail 2>/dev/null`" ]; then echo Mailing request from $REQUEST_FILE - if sendmail -t -oi < $REQUEST_FILE; then + if sendmail -t -oi -f "$EMAIL" < $REQUEST_FILE; then requestsent=1 fi fi @@ -329,6 +314,8 @@ load_config() { db_get bacula-cn/contact CONTACT=$RET + EMAIL=${CONTACT#*<} + EMAIL=${EMAIL%>*} PASS_FD=$( random_string ) PASS_BCONSOLE=$( random_string )