diff options
author | maride <maride@darknebu.la> | 2018-09-04 16:11:40 +0200 |
---|---|---|
committer | maride <maride@darknebu.la> | 2018-09-04 16:11:40 +0200 |
commit | 76bc68cb6abb3105bfb154fc59ecdfd54f8ff564 (patch) | |
tree | c89a88c9927ae42916d3811679083b40cd9b610b /src/main.go | |
parent | 17eb37c2838d9d786ec7d5a7f071cc83b4a3044e (diff) |
Increase logging
Diffstat (limited to 'src/main.go')
-rw-r--r-- | src/main.go | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/main.go b/src/main.go index ae50632..aac4f02 100644 --- a/src/main.go +++ b/src/main.go @@ -7,6 +7,7 @@ import ( func main() { // Set up flags + log.Println("Setting up components") registerHTTPFlags() registerSessionFlags() registerCredentialsFlags() @@ -15,12 +16,24 @@ func main() { flag.Parse() // Read challenges from file - getChallengesFromSeedFile() + log.Println("Reading seed file") + readChallengesError := getChallengesFromSeedFile() + if readChallengesError != nil { + log.Fatalln(readChallengesError.Error()) + } // Start our VPN container and network - startVPN() + log.Printf("Starting VPN container ('%s')", vpnContainerName) + startVPNError := startVPN() + if startVPNError != nil { + log.Fatalln(startVPNError.Error()) + } defer stopVPN() // Run HTTP server - log.Fatalln(runHTTPServer()) + log.Printf("Running HTTP server on port %d", *port) + runHTTPServerError := runHTTPServer() + if runHTTPServerError != nil { + log.Fatalln(runHTTPServerError) + } } \ No newline at end of file |