summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoey Hess2016-04-05 17:33:21 -0400
committerJoey Hess2016-04-05 17:33:21 -0400
commitdd869a7d9f2421f1813ee97e50e24e84cac1b666 (patch)
treebfffa61a4d9571d4449e395f5b8d2652bae3325a /src
parentd712ba163b26a2ccb5faf2202bcb5593c7e130d4 (diff)
parent8b510078365356605bafbd24bf1c09e9bb71194b (diff)
Merge commit '8b510078365356605bafbd24bf1c09e9bb71194b'
Diffstat (limited to 'src')
-rw-r--r--src/Propellor/Property/Apt.hs24
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.