diff --git a/g.cgi.go b/g.cgi.go index 3dbc3fa..ee1f027 100644 --- a/g.cgi.go +++ b/g.cgi.go @@ -10,8 +10,6 @@ import ( ) const GitProjectRoot = "/home/neale/projects" -const CgitConfig = "/home/neale/public_html/cgitrc" -const Cgit = "/opt/cgit/cgit.cgi" // printf "USER:PASS" | base64 | while read a; do printf "%s" "$a" | md5sum; done var allowed = []string{ @@ -56,13 +54,32 @@ func Authenticated() bool { return false } +func notice() { + fmt.Println("Content-type: text/html") + fmt.Println() + fmt.Println("") + fmt.Println("
") + fmt.Println("") + fmt.Println("X11 things may now be in the") + fmt.Println("9wm team.") + fmt.Println("
") + fmt.Println("Network security things may now be in the") + fmt.Println("dirtbags team.") + fmt.Println("") +} + func main() { log.SetFlags(0) //log.SetOutput(os.Stdout) //log.SetPrefix("Status: 500 CGI Go Boom\nContent-type: text/plain\n\nERROR: ") os.Setenv("GIT_PROJECT_ROOT", GitProjectRoot) - os.Setenv("CGIT_CONFIG", CgitConfig) uri := os.Getenv("REQUEST_URI") switch { @@ -79,6 +96,6 @@ func main() { case strings.HasSuffix(uri, "git-upload-pack"): execv("git", "http-backend") default: - execv(Cgit) + notice() } } diff --git a/images/carbusbike.gif b/images/carbusbike.gif new file mode 100644 index 0000000..36b00bf Binary files /dev/null and b/images/carbusbike.gif differ