This commit is contained in:
27
main.go
27
main.go
@@ -598,12 +598,31 @@ const (
|
||||
// main
|
||||
// ──────────────────────────────────────────────────────────────────────────────
|
||||
func main() {
|
||||
serveonly := flag.String("serveonly", "1", "no download just serve")
|
||||
delay := flag.Duration("delay", defaultDelay, "delay between downloads (e.g. 5s, 1m)")
|
||||
outDir := flag.String("out", "./lists/", "target directory")
|
||||
//serveonly := flag.String("serveonly", "1", "no download just serve")
|
||||
serveonly := os.Getenv("SERVEONLY")
|
||||
if serveonly == "" {
|
||||
serveonly = "1"
|
||||
}
|
||||
|
||||
//delay := flag.Duration("delay", defaultDelay, "delay between downloads (e.g. 5s, 1m)")
|
||||
delay := os.Getenv("DELAY")
|
||||
if delay == "" {
|
||||
delay = defaultDelay
|
||||
}
|
||||
|
||||
//outDir := flag.String("out", "./lists/", "target directory")
|
||||
outDir := os.Getenv("OUTDIR")
|
||||
if outDir == "" {
|
||||
outDir = "/lists/"
|
||||
}
|
||||
|
||||
listFile := flag.String("list", "", "optional text file with URLs or Name|URL pairs (overrides built-in map)")
|
||||
listenAddr := flag.String("listen", ":8080", "HTTP listen address (e.g. :8080 or 127.0.0.1:8000)")
|
||||
listenPrefix := flag.String("prefix", "http://importer:8080", "HTTP prefix for url in /lists.json")
|
||||
//listenPrefix := flag.String("prefix", "http://importer:8080", "HTTP prefix for url in /lists.json")
|
||||
listenPrefix := os.Getenv("PREFIX")
|
||||
if listenPrefix == "" {
|
||||
listenPrefix = "http://flodimporter:8080"
|
||||
}
|
||||
flag.Parse()
|
||||
|
||||
if *serveonly != "1" {
|
||||
|
Reference in New Issue
Block a user