propellor/Property/Hostname.hs

12 lines
240 B
Haskell
Raw Normal View History

2014-03-30 03:45:48 +00:00
module Property.Hostname where
import Property
2014-03-30 04:28:56 +00:00
import Utility.SafeCommand
2014-03-30 03:45:48 +00:00
type HostName = String
set :: HostName -> Property
2014-03-30 04:33:45 +00:00
set hostname =
fileHasContent "/etc/hostname" [hostname]
`onChange` cmdProperty "hostname" [Param hostname]