stealth mode

This commit is contained in:
Brad Fitzpatrick 2010-07-18 09:56:31 -07:00
parent ba4d16a69d
commit 1121f6a79c
1 changed files with 6 additions and 1 deletions

View File

@ -28,6 +28,7 @@ import "util/util"
var listen *string = flag.String("listen", "0.0.0.0:3179", "host:port to listen on")
var storageRoot *string = flag.String("root", "/tmp/camliroot", "Root directory to store files")
var stealthMode *bool = flag.Bool("stealth", true, "Run in stealth mode.")
var putPassword string
@ -392,9 +393,13 @@ func handlePut(conn *http.Conn, req *http.Request) {
}
func HandleRoot(conn *http.Conn, req *http.Request) {
fmt.Fprintf(conn, `
if *stealthMode {
fmt.Fprintf(conn, "Hi.\n")
} else {
fmt.Fprintf(conn, `
This is camlistored, a Camlistore storage daemon.
`)
}
}
func main() {