summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/unattended-upgrades.erb2
1 files changed, 2 insertions, 0 deletions
diff --git a/templates/unattended-upgrades.erb b/templates/unattended-upgrades.erb
index 3eb9230..6c24b71 100644
--- a/templates/unattended-upgrades.erb
+++ b/templates/unattended-upgrades.erb
@@ -40,10 +40,12 @@ Unattended-Upgrade::InstallOnShutdown "<%= @install_on_shutdown.to_s %>";
// 'mailx' must be installed.
Unattended-Upgrade::Mail "<%= @_mail['to'] %>";
+<%- if @_mail['only_on_error'] -%>
// Set this value to "true" to get emails only on errors. Default
// is to always send a mail if Unattended-Upgrade::Mail is set
Unattended-Upgrade::MailOnlyOnError "<%= @_mail['only_on_error'].to_s %>";
<%- end -%>
+<%- end -%>
// Do automatic removal of new unused dependencies after the upgrade
// (equivalent to apt-get autoremove)