non-interactive option

- add -y flag for non-interactive use
- refactor main
- output to logfile (not ideal..) but not to all ethutil loggers for privacy
This commit is contained in:
zelig
2014-04-16 14:57:51 +01:00
parent f4c13f8656
commit 32b09d652d
2 changed files with 50 additions and 58 deletions

View File

@ -17,12 +17,14 @@ var ImportKey string
var ExportKey bool
var LogFile string
var DataDir string
var NonInteractive bool
func Init() {
flag.BoolVar(&StartConsole, "c", false, "debug and testing console")
flag.BoolVar(&StartMining, "m", false, "start dagger mining")
flag.BoolVar(&ShowGenesis, "g", false, "prints genesis header and exits")
//flag.BoolVar(&UseGui, "gui", true, "use the gui")
flag.BoolVar(&NonInteractive, "y", false, "non-interactive mode (say yes to confirmations)")
flag.BoolVar(&UseUPnP, "upnp", false, "enable UPnP support")
flag.BoolVar(&UseSeed, "seed", true, "seed peers")
flag.BoolVar(&GenAddr, "genaddr", false, "create a new priv/pub key")