diff --git a/sys/restart_unix.go b/sys/restart_unix.go index 18ec706d..f5e36974 100644 --- a/sys/restart_unix.go +++ b/sys/restart_unix.go @@ -21,7 +21,7 @@ func NewRestarter() *UnixRestarter { func (r *UnixRestarter) Restart(executableName string) error { scriptContent := "#!/bin/sh\n" + "sleep 1\n" + // Sleep for a bit to allow the main application to exit - "exec ." + executableName + "\n" + "sh -c '" + executableName + "'\n" scriptName := "restart.sh" if err := os.WriteFile(scriptName, []byte(scriptContent), 0755); err != nil {