summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/DebianMirror.hs
diff options
context:
space:
mode:
authorFélix Sipma2015-09-11 11:09:38 +0200
committerJoey Hess2015-09-11 11:24:30 -0400
commit1a1bbd3efe5d567b342f3ace29a92afb149bbb3f (patch)
tree4156c4c67716d423b31258a5e3003b10e0ebc365 /src/Propellor/Property/DebianMirror.hs
parentaef9f836ffba8ffbac669f0060b5963d5b10bfd7 (diff)
DebianMirror: run cronjob as user "debmirror"
Signed-off-by: Félix Sipma <felix.sipma@no-log.org>
Diffstat (limited to 'src/Propellor/Property/DebianMirror.hs')
-rw-r--r--src/Propellor/Property/DebianMirror.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Propellor/Property/DebianMirror.hs b/src/Propellor/Property/DebianMirror.hs
index 37a22ae0..252520c7 100644
--- a/src/Propellor/Property/DebianMirror.hs
+++ b/src/Propellor/Property/DebianMirror.hs
@@ -8,6 +8,7 @@ import Propellor
import qualified Propellor.Property.File as File
import qualified Propellor.Property.Apt as Apt
import qualified Propellor.Property.Cron as Cron
+import qualified Propellor.Property.User as User
import Data.List
@@ -27,10 +28,11 @@ mirror :: Url -> FilePath -> [DebianSuite] -> [Architecture] -> [Apt.Section] ->
mirror url dir suites archs sections source priorities crontimes = propertyList
("Debian mirror " ++ dir)
[ Apt.installed ["debmirror"]
+ , User.accountFor "debmirror"
, File.dirExists dir
, check (not . and <$> mapM suitemirrored suites) $ cmdProperty "debmirror" args
`describe` "debmirror setup"
- , Cron.niceJob ("debmirror_" ++ dir) crontimes (User "root") "/" $
+ , Cron.niceJob ("debmirror_" ++ dir) crontimes (User "debmirror") "/" $
unwords ("/usr/bin/debmirror" : args)
]
where