diff options
Diffstat (limited to 'Property')
| -rw-r--r-- | Property/GitHome.hs | 4 | ||||
| -rw-r--r-- | Property/Reboot.hs | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/Property/GitHome.hs b/Property/GitHome.hs index 6bbae254..f0764db9 100644 --- a/Property/GitHome.hs +++ b/Property/GitHome.hs @@ -13,8 +13,8 @@ import Utility.Monad import Utility.Exception {- Clones Joey Hess's git home directory, and runs its fixups script. -} -installed :: UserName -> Property -installed user = check (not <$> hasGitDir user) $ +installedFor :: UserName -> Property +installedFor user = check (not <$> hasGitDir user) $ IOProperty ("githome " ++ user) (go =<< homedir user) where go Nothing = noChange diff --git a/Property/Reboot.hs b/Property/Reboot.hs new file mode 100644 index 00000000..668a7a49 --- /dev/null +++ b/Property/Reboot.hs @@ -0,0 +1,8 @@ +module Property.Reboot where + +import Property +import Utility.SafeCommand + +{- Use eg, "+5" to reboot in 5 minutes. -} +scheduled :: String -> Property +scheduled rebootwhen = cmdProperty "shutdown" [ Param "-r", Param rebootwhen ] |
