summaryrefslogtreecommitdiff
path: root/web.go
diff options
context:
space:
mode:
Diffstat (limited to 'web.go')
-rw-r--r--web.go15
1 files changed, 5 insertions, 10 deletions
diff --git a/web.go b/web.go
index 6456ca4..9f754a2 100644
--- a/web.go
+++ b/web.go
@@ -57,22 +57,19 @@ func listenerSetup() {
strconv.Itoa(int(serverConfig["port"].(int64))))
listener, err = net.Listen("tcp", address)
if err != nil {
- log.Errorf("Unable to listen on %s, %s", address, err)
- os.Exit(1)
+ log.Errorf("Error binding %s, %s", address, err)
}
log.Infof("Web server listening on %s.", address)
case true:
path := serverConfig["host"].(string)
listener, err = net.Listen("unix", path)
if err != nil {
- log.Errorf("Unable to listen on %s, %s", path, err)
- os.Exit(1)
+ log.Errorf("Error binding %s, %s", path, err)
}
err = syscall.Chmod(path, 0777)
if err != nil {
- log.Errorf("Unable to change permission of web server socket, %s", err)
- os.Exit(1)
+ log.Errorf("Error changing permission of web server socket, %s", err)
}
log.Infof("Web server listening on unix socket %s.", path)
@@ -87,8 +84,7 @@ func runWebServer() {
if err == http.ErrServerClosed {
log.Info("Web server closed.")
} else {
- log.Errorf("Error while serving, %s", err)
- os.Exit(1)
+ log.Errorf("Error starting server, %s", err)
}
}
@@ -105,8 +101,7 @@ func registerWebpage() {
var public fs.FS
public, err = fs.Sub(assets, "assets")
if err != nil {
- log.Fatalf("Error while getting subdirectory, %s", err)
- os.Exit(1)
+ log.Fatalf("Error getting subdirectory, %s", err)
}
router.StaticFS("/web", http.FS(public))
}