From 61d8214d9d8cea6ba047d1a26f9edc1ea180234b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 30 Mar 2014 19:10:32 -0400 Subject: propellor spin --- HostName.hs | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 HostName.hs (limited to 'HostName.hs') diff --git a/HostName.hs b/HostName.hs deleted file mode 100644 index 2cc50ea9..00000000 --- a/HostName.hs +++ /dev/null @@ -1,18 +0,0 @@ -module HostName where - -import Control.Applicative -import System.Environment - -import Utility.Process - -type HostName = String - -getHostName :: IO HostName -getHostName = go =<< getArgs - where - go (h:_) = return h - go [] = do - s <- takeWhile (/= '\n') <$> readProcess "hostname" ["-f"] - if null s - then error "Cannot determine hostname! Pass it on the command line." - else return s -- cgit v1.2.3