From 1143ca7c5c673094ec2ab11d61d75a8928da6f2b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 18 Jul 2014 12:48:08 -0400 Subject: [PATCH] propellor spin --- config-joey.hs | 2 ++ src/Propellor/Property/Hostname.hs | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/config-joey.hs b/config-joey.hs index b95a327..c3fb177 100644 --- a/config-joey.hs +++ b/config-joey.hs @@ -102,7 +102,9 @@ hosts = -- (o) ` `requires` Gpg.keyImported "98147487" "root" `requires` Ssh.keyImported SshRsa "root" (Context "kite.kitenet.net") + & JoeySites.kiteMailServer + -- & alias "smtp.kitenet.net" -- not yet live! & Apt.installed ["mutt", "alpine", "git-annex", "myrepos"] -- Since password authentication is allowed: diff --git a/src/Propellor/Property/Hostname.hs b/src/Propellor/Property/Hostname.hs index c3821eb..c489e2f 100644 --- a/src/Propellor/Property/Hostname.hs +++ b/src/Propellor/Property/Hostname.hs @@ -9,6 +9,8 @@ import Data.List -- -- Configures /etc/hostname and the current hostname. -- +-- Configures /etc/mailname with the domain part of the hostname. +-- -- /etc/hosts is also configured, with an entry for 127.0.1.1, which is -- standard at least on Debian to set the FDQN. -- @@ -31,6 +33,8 @@ setTo hn = combineProperties desc go else Just $ trivial $ hostsline "127.0.1.1" [hn, basehost] , Just $ trivial $ hostsline "127.0.0.1" ["localhost"] , Just $ trivial $ cmdProperty "hostname" [basehost] + , Just $ "/etc/mailname" `File.hasContent` + [if null domain then hn else domain] ] hostsline ip names = File.fileProperty desc