Example #1
0
func cmdRunRedirector() {
	rpath := *redirectorPathFlag
	if rpath == "" {
		rpath = determineWebroot()
	}

	service.Main(&service.Info{
		Name:          "acmetool",
		Description:   "acmetool HTTP redirector",
		DefaultChroot: rpath,
		NewFunc: func() (service.Runnable, error) {
			return redirector.New(redirector.Config{
				Bind:          ":80",
				ChallengePath: rpath,
				ChallengeGID:  *redirectorGIDFlag,
			})
		},
	})
}
Example #2
0
File: main.go Project: hlandau/acme
func cmdRunRedirector() {
	rpath := *redirectorPathFlag
	if rpath == "" {
		// redirector process is internet-facing and must never touch private keys
		storage.Neuter()
		rpath = determineWebroot()
	}

	service.Main(&service.Info{
		Name:          "acmetool",
		Description:   "acmetool HTTP redirector",
		DefaultChroot: rpath,
		NewFunc: func() (service.Runnable, error) {
			return redirector.New(redirector.Config{
				Bind:          ":80",
				ChallengePath: rpath,
				ChallengeGID:  *redirectorGIDFlag,
			})
		},
	})
}