diff options
| author | Joey Hess <joey@kitenet.net> | 2014-03-30 19:10:32 -0400 |
|---|---|---|
| committer | Joey Hess <joey@kitenet.net> | 2014-03-30 19:10:32 -0400 |
| commit | 61d8214d9d8cea6ba047d1a26f9edc1ea180234b (patch) | |
| tree | 1e9f0184af88eed1dd5974bf2f47b0765c23b321 /HostName.hs | |
| parent | 4e442f4bcf04a68f638393d180ac7664ddd0fe4b (diff) | |
propellor spin
Diffstat (limited to 'HostName.hs')
| -rw-r--r-- | HostName.hs | 18 |
1 files changed, 0 insertions, 18 deletions
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 |
