diff --git a/helpers/WebCPNSD.curry b/helpers/WebCPNSD.curry index b510387ca9ff1c211e34eb733b503d7322582be0..0c5c69867e114cdbd37b88d62b3f284c5a8067be 100644 --- a/helpers/WebCPNSD.curry +++ b/helpers/WebCPNSD.curry @@ -26,7 +26,7 @@ main :: IO HtmlForm main = do param <- getUrlParameter remote <- getEnviron "REMOTE_ADDR" - if remote == "127.0.0.1" + if remote `elem` ["127.0.0.1","::1"] then do result <- execCommand param return $ answerText result else return $ answerText $ @@ -36,6 +36,7 @@ execCommand :: String -> IO String execCommand param = case param of "status" -> cpnsCmd "status" "log" -> cpnsCmd "log" + "start" -> cpnsCmd "start" _ -> return $ unlines $ ["ILLEGAL URL PARAMETER: " ++ param, "", cpnsCommands] where @@ -43,7 +44,7 @@ execCommand param = case param of (_,out,err) <- evalCmd "curry-cpnsd" [cmd] "" return $ out ++ if null err then "" else "ERROR OUTPUT:\n" ++ err - cpnsCommands = "Allowed arguments: status | log" + cpnsCommands = "Allowed arguments: status | log | start" -- Install the CGI script in user homepage by: diff --git a/helpers/WebRegistry.curry b/helpers/WebRegistry.curry index 9a612a6cf8079da7de5d95e4c9be51d45b1c1ff6..79a49531baeccc9ff33d535fe3dcbea5bfebd24b 100644 --- a/helpers/WebRegistry.curry +++ b/helpers/WebRegistry.curry @@ -28,7 +28,7 @@ main :: IO HtmlForm main = do param <- getUrlParameter remote <- getEnviron "REMOTE_ADDR" - if remote == "127.0.0.1" + if remote `elem` ["127.0.0.1","::1"] then do result <- execCommand param return $ answerText result else return $ answerText $