fix: remove --tray flag for Linux server launch
The Linux server binary is built with CGO_ENABLED=0 and -tags notray, so --tray is not available. The systemd service and LaunchServer now start the server without the --tray flag on Linux. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
1a2811f8c9
commit
b806a42bcd
@ -648,11 +648,13 @@ func (inst *Installer) LaunchServer() (string, error) {
|
||||
|
||||
// Read config to get relay args
|
||||
// Windows: use --gui (web-based controller, no CGO needed)
|
||||
// macOS/Linux: use --tray (system tray, CGO-enabled build)
|
||||
// macOS: use --tray (system tray, CGO-enabled build)
|
||||
// Linux: no flag (headless server, no tray/gui)
|
||||
var args []string
|
||||
if runtime.GOOS == "windows" {
|
||||
switch runtime.GOOS {
|
||||
case "windows":
|
||||
args = append(args, "--gui")
|
||||
} else {
|
||||
case "darwin":
|
||||
args = append(args, "--tray")
|
||||
}
|
||||
cfgPath := filepath.Join(platformConfigDir(), "config.json")
|
||||
|
||||
@ -85,7 +85,7 @@ func installAutoRestart(installDir string) error {
|
||||
"",
|
||||
"[Service]",
|
||||
"Type=simple",
|
||||
"ExecStart=" + binPath + " --tray",
|
||||
"ExecStart=" + binPath,
|
||||
"WorkingDirectory=" + installDir,
|
||||
"Restart=on-failure",
|
||||
"RestartSec=5",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user