mirror of
https://github.com/ergochat/ergo.git
synced 2024-12-22 18:52:41 +01:00
don't require a config file for mksecret
This commit is contained in:
parent
18cf816396
commit
fd8fd3e252
@ -59,7 +59,7 @@ Options:
|
|||||||
|
|
||||||
arguments, _ := docopt.ParseArgs(usage, nil, version)
|
arguments, _ := docopt.ParseArgs(usage, nil, version)
|
||||||
|
|
||||||
// don't require a config file for genpasswd
|
// don't require a config file for genpasswd or mksecret
|
||||||
if arguments["genpasswd"].(bool) {
|
if arguments["genpasswd"].(bool) {
|
||||||
var password string
|
var password string
|
||||||
fd := int(os.Stdin.Fd())
|
fd := int(os.Stdin.Fd())
|
||||||
@ -85,6 +85,9 @@ Options:
|
|||||||
fmt.Println()
|
fmt.Println()
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
|
} else if arguments["mksecret"].(bool) {
|
||||||
|
fmt.Println(utils.GenerateSecretKey())
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
configfile := arguments["--conf"].(string)
|
configfile := arguments["--conf"].(string)
|
||||||
@ -130,8 +133,6 @@ Options:
|
|||||||
log.Fatal(" Could not create certificate:", err.Error())
|
log.Fatal(" Could not create certificate:", err.Error())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if arguments["mksecret"].(bool) {
|
|
||||||
fmt.Println(utils.GenerateSecretKey())
|
|
||||||
} else if arguments["run"].(bool) {
|
} else if arguments["run"].(bool) {
|
||||||
if !arguments["--quiet"].(bool) {
|
if !arguments["--quiet"].(bool) {
|
||||||
logman.Info("server", fmt.Sprintf("Oragono v%s starting", irc.SemVer))
|
logman.Info("server", fmt.Sprintf("Oragono v%s starting", irc.SemVer))
|
||||||
|
Loading…
Reference in New Issue
Block a user