diff options
| author | Félix Sipma <felix.sipma@no-log.org> | 2016-04-05 20:39:19 +0200 |
|---|---|---|
| committer | Félix Sipma <felix.sipma@no-log.org> | 2016-04-05 20:39:19 +0200 |
| commit | 8b510078365356605bafbd24bf1c09e9bb71194b (patch) | |
| tree | 3648f0fd11975f90916916ed6852ab36ae7e8e3c /src | |
| parent | dd041e2c1bf41a3d50cd95009b93a90f685ac4fe (diff) | |
Apt.unattendedUpgrades: mail root
Diffstat (limited to 'src')
| -rw-r--r-- | src/Propellor/Property/Apt.hs | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index 58a83c43..5e185a0e 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -249,15 +249,21 @@ unattendedUpgrades = enable <!> disable | otherwise = "false" configure :: Property DebianLike - configure = withOS "unattended upgrades configured" $ \w o -> - case o of - -- the package defaults to only upgrading stable - (Just (System (Debian suite) _)) - | not (isStable suite) -> ensureProperty w $ - "/etc/apt/apt.conf.d/50unattended-upgrades" - `File.containsLine` - ("Unattended-Upgrade::Origins-Pattern { \"o=Debian,a="++showSuite suite++"\"; };") - _ -> noChange + configure = propertyList "unattended upgrades configured" $ props + & enableupgrading + & unattendedconfig `File.containsLine` "Unattended-Upgrade::Mail \"root\";" + where + enableupgrading :: Property DebianLike + enableupgrading = withOS "unattended upgrades configured" $ \w o -> + case o of + -- the package defaults to only upgrading stable + (Just (System (Debian suite) _)) + | not (isStable suite) -> ensureProperty w $ + unattendedconfig + `File.containsLine` + ("Unattended-Upgrade::Origins-Pattern { \"o=Debian,a="++showSuite suite++"\"; };") + _ -> noChange + unattendedconfig = "/etc/apt/apt.conf.d/50unattended-upgrades" -- | Enable periodic updates (but not upgrades), including download -- of packages. |
