+1
-1
@@ -216,7 +216,7 @@ func parseParams(subCommand string) {
|
|||||||
daemonMode := fset.Bool("d", false, "daemonMode")
|
daemonMode := fset.Bool("d", false, "daemonMode")
|
||||||
notVerbose := fset.Bool("nv", false, "not log console")
|
notVerbose := fset.Bool("nv", false, "not log console")
|
||||||
newconfig := fset.Bool("newconfig", false, "not load existing config.json")
|
newconfig := fset.Bool("newconfig", false, "not load existing config.json")
|
||||||
logLevel := fset.Int("loglevel", 0, "0:info 1:warn 2:error 3:debug")
|
logLevel := fset.Int("loglevel", 1, "0:debug 1:info 2:warn 3:error")
|
||||||
if subCommand == "" { // no subcommand
|
if subCommand == "" { // no subcommand
|
||||||
fset.Parse(os.Args[1:])
|
fset.Parse(os.Args[1:])
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ func Run() {
|
|||||||
fmt.Println(OpenP2PVersion)
|
fmt.Println(OpenP2PVersion)
|
||||||
return
|
return
|
||||||
case "update":
|
case "update":
|
||||||
gLog = NewLogger(baseDir, ProductName, LvDEBUG, 1024*1024, LogFileAndConsole)
|
|
||||||
targetPath := filepath.Join(defaultInstallPath, defaultBinName)
|
targetPath := filepath.Join(defaultInstallPath, defaultBinName)
|
||||||
d := daemon{}
|
d := daemon{}
|
||||||
err := d.Control("restart", targetPath, nil)
|
err := d.Control("restart", targetPath, nil)
|
||||||
|
|||||||
Reference in New Issue
Block a user