diff options
| author | Joey Hess <joeyh@joeyh.name> | 2017-07-17 16:51:00 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2017-07-17 16:51:00 -0400 |
| commit | 7e53d16aa18f343de70830219095fbf8e1566a2f (patch) | |
| tree | b31044c089a6099a7b2ebfed27c3de6a21085f93 /src/Propellor/Property/Timezone.hs | |
| parent | e2792f93555c0d35313c976604c4ee20f3dd36e2 (diff) | |
| parent | c987a3a3bd14171071b85c5937773a47b23859ff (diff) | |
Merge branch 'master' into joeyconfig
Diffstat (limited to 'src/Propellor/Property/Timezone.hs')
| -rw-r--r-- | src/Propellor/Property/Timezone.hs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/Propellor/Property/Timezone.hs b/src/Propellor/Property/Timezone.hs new file mode 100644 index 00000000..96a5e59c --- /dev/null +++ b/src/Propellor/Property/Timezone.hs @@ -0,0 +1,21 @@ +-- | Maintainer: Sean Whitton <spwhitton@spwhitton.name> + +module Propellor.Property.Timezone where + +import Propellor.Base +import qualified Propellor.Property.Apt as Apt +import qualified Propellor.Property.File as File + +-- | A timezone from /usr/share/zoneinfo +type Timezone = String + +-- | Sets the system's timezone +configured :: Timezone -> Property DebianLike +configured zone = File.hasContent "/etc/timezone" [zone] + `onChange` update + `describe` (zone ++ " timezone configured") + where + update = Apt.reConfigure "tzdata" mempty + -- work around a bug in recent tzdata. See + -- https://bugs.launchpad.net/ubuntu/+source/tzdata/+bug/1554806/ + `requires` File.notPresent "/etc/localtime" |
