propellor/Property/Hostname.hs

12 lines
279 B
Haskell
Raw Normal View History

2014-03-30 03:45:48 +00:00
module Property.Hostname where
import Property
2014-03-30 17:12:33 +00:00
import qualified Property.File as File
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 17:12:33 +00:00
set hostname = "/etc/hostname" `File.hasContent` [hostname]
`onChange` cmdProperty "hostname" [Param hostname]