Skip to content
This repository has been archived by the owner on Feb 9, 2023. It is now read-only.

Commit

Permalink
Move config load to remove odd error
Browse files Browse the repository at this point in the history
  • Loading branch information
LordRalex committed Apr 21, 2019
1 parent 73b74a3 commit 55ac40b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions pufferd.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@ func main() {
return
}

if runInstaller {
install.Install(configPath, authRoot, authToken)
}

if runInstaller || !runDaemon {
return
}

if !runInstaller {
if _, err := os.Stat(configPath); os.IsNotExist(err) {
defaultPath := "config.json"
Expand All @@ -110,14 +118,6 @@ func main() {
}
}

if runInstaller {
install.Install(configPath, authRoot, authToken)
}

if runInstaller || !runDaemon {
return
}

config.Load(configPath)

logging.SetLevelByString(loggingLevel)
Expand Down

0 comments on commit 55ac40b

Please sign in to comment.