From 811ad9d4f5e907c7064d86db89a40e840b187f55 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 24 Nov 2015 09:53:53 -0400 Subject: found this handy conversion of my blog post to propellor property in spwhitton's repo --- config-joey.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'config-joey.hs') diff --git a/config-joey.hs b/config-joey.hs index 34b48027..479bb221 100644 --- a/config-joey.hs +++ b/config-joey.hs @@ -80,6 +80,8 @@ darkstar = host "darkstar.kitenet.net" & JoeySites.postfixClientRelay (Context "darkstar.kitenet.net") & JoeySites.dkimMilter + & alarmClock "*-*-* 7:30" (User "joey") + "/usr/bin/timeout 45m /home/joey/bin/goodmorning" & imageBuilt "/tmp/img" c MSDOS (grubBooted PC) [ partition EXT2 `mountedAt` "/boot" -- cgit v1.2.3 From 776c11f6a9187da03324b879e744a8f07b480a09 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 24 Nov 2015 09:58:45 -0400 Subject: fixes --- config-joey.hs | 2 +- src/Propellor/Property/SiteSpecific/JoeySites.hs | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'config-joey.hs') diff --git a/config-joey.hs b/config-joey.hs index 479bb221..98cb195a 100644 --- a/config-joey.hs +++ b/config-joey.hs @@ -80,7 +80,7 @@ darkstar = host "darkstar.kitenet.net" & JoeySites.postfixClientRelay (Context "darkstar.kitenet.net") & JoeySites.dkimMilter - & alarmClock "*-*-* 7:30" (User "joey") + & JoeySites.alarmClock "*-*-* 7:30" (User "joey") "/usr/bin/timeout 45m /home/joey/bin/goodmorning" & imageBuilt "/tmp/img" c MSDOS (grubBooted PC) diff --git a/src/Propellor/Property/SiteSpecific/JoeySites.hs b/src/Propellor/Property/SiteSpecific/JoeySites.hs index f428d382..d22eb615 100644 --- a/src/Propellor/Property/SiteSpecific/JoeySites.hs +++ b/src/Propellor/Property/SiteSpecific/JoeySites.hs @@ -6,6 +6,7 @@ module Propellor.Property.SiteSpecific.JoeySites where import Propellor.Base import qualified Propellor.Property.Apt as Apt import qualified Propellor.Property.File as File +import qualified Propellor.Property.ConfFile as ConfFile import qualified Propellor.Property.Gpg as Gpg import qualified Propellor.Property.Ssh as Ssh import qualified Propellor.Property.Git as Git @@ -961,11 +962,11 @@ alarmClock oncalendar (User user) command = combineProperties , "" , "[Service]" , "Type=oneshot" - , "ExecStart=/bin/systemd-inhibit --what=handle-lid-switch --why=goodmorning /bin/su " ++ user ++ " -c \"" ++ program ++ "\"" + , "ExecStart=/bin/systemd-inhibit --what=handle-lid-switch --why=goodmorning /bin/su " ++ user ++ " -c \"" ++ command ++ "\"" ] `onChange` Systemd.daemonReloaded , Systemd.enabled "goodmorning.timer" , Systemd.started "goodmorning.timer" - , "/etc/systemd/logind.conf" `File.containsConfPair` + , "/etc/systemd/logind.conf" `ConfFile.containsIniSetting` ("Login", "LidSwitchIgnoreInhibited", "no") ] -- cgit v1.2.3