summaryrefslogtreecommitdiff
path: root/GitAnnex.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-11-06 16:33:45 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-11-06 16:33:45 -0400
commitc86c3dd1d1d18747d42dfafcbaa4d5e87f41892b (patch)
treefbd70ee78127b4291f391e91eb6050744a99f5f2 /GitAnnex.hs
parente040b23aa1754ca4e210a79969ca5b146c1120f0 (diff)
Allow optionally configuring git-annex with -fEKG to enable awesome remote monitoring interfaceat http://localhost:4242/
Diffstat (limited to 'GitAnnex.hs')
-rw-r--r--GitAnnex.hs11
1 files changed, 9 insertions, 2 deletions
diff --git a/GitAnnex.hs b/GitAnnex.hs
index b73cd9416..d6de50d03 100644
--- a/GitAnnex.hs
+++ b/GitAnnex.hs
@@ -5,7 +5,7 @@
- Licensed under the GNU GPL version 3 or higher.
-}
-{-# LANGUAGE CPP #-}
+{-# LANGUAGE CPP, OverloadedStrings #-}
module GitAnnex where
@@ -87,6 +87,9 @@ import qualified Command.XMPPGit
import qualified Command.Test
import qualified Command.FuzzTest
#endif
+#ifdef WITH_EKG
+import System.Remote.Monitoring
+#endif
cmds :: [Command]
cmds = concat
@@ -169,4 +172,8 @@ header :: String
header = "git-annex command [option ...]"
run :: [String] -> IO ()
-run args = dispatch True args cmds options [] header Git.CurrentRepo.get
+run args = do
+#ifdef WITH_EKG
+ _ <- forkServer "localhost" 4242
+#endif
+ dispatch True args cmds options [] header Git.CurrentRepo.get