We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 57c10aa + 7b596f1 commit bbeefcaCopy full SHA for bbeefca
daemon/commands.go
@@ -7,6 +7,7 @@ package daemon
7
import (
8
"net"
9
"os"
10
+ "os/exec"
11
"os/user"
12
"strconv"
13
"syscall"
@@ -102,16 +103,24 @@ func StartForkedDaemon(log *logger.Log) {
102
103
Sys: &sysproc,
104
}
105
106
+ bin, err := exec.LookPath(os.Args[0])
107
+
108
+ if err != nil {
109
+ log.LogErr("Could not find webby binary")
110
+ }
111
112
+ log.LogInfo("Found webby binary (" + bin + ")...")
113
log.LogInfo("Starting process...")
114
115
proc, err := os.StartProcess(
- os.Args[0],
116
+ bin,
117
[]string{os.Args[0], "-" + Daemon},
118
&attr,
119
)
120
121
if err != nil {
122
log.LogErr("Failed to start system process")
123
+ log.LogErr(err.Error())
124
return
125
126
0 commit comments