3 Commits
v2.5 ... v2.7

Author SHA1 Message Date
f78e3092fb mod: copy stderr from ssh session to locally running processes stderr
All checks were successful
Go Project Action / Spell-check and test go project (push) Successful in 51s
Release Go Application / Release go project (release) Successful in 46s
Log the `serve` version in the beginning with a closing log message.
2025-10-31 23:03:30 +01:00
d976100cfb fix: correctly log unrecoverable serve errors
All checks were successful
Go Project Action / Spell-check and test go project (push) Successful in 52s
Release Go Application / Release go project (release) Successful in 46s
2025-10-31 22:38:25 +01:00
f5e41edd44 mod: redirect stderr of executed command for serve to log file
Some checks failed
Go Project Action / Spell-check and test go project (push) Failing after 54s
Release Go Application / Release go project (release) Successful in 51s
2025-10-31 22:35:02 +01:00

View File

@@ -4,6 +4,7 @@ import (
"context" "context"
"errors" "errors"
"fmt" "fmt"
"io"
"net" "net"
"os" "os"
"os/signal" "os/signal"
@@ -59,6 +60,7 @@ func setupSshServer(host string, port string, host_key_path string, users map[st
if err := cmd.Run(); err != nil { if err := cmd.Run(); err != nil {
wish.Fatalln(s, err) wish.Fatalln(s, err)
} }
io.Copy(os.Stderr, s.Stderr())
next(s) next(s)
} }
}, },
@@ -71,6 +73,9 @@ func setupSshServer(host string, port string, host_key_path string, users map[st
// Serve an ssh application using the provided arguments. // Serve an ssh application using the provided arguments.
func Serve(host string, port string, host_key_path string, users map[string]string, name string, args []string) { func Serve(host string, port string, host_key_path string, users map[string]string, name string, args []string) {
setupLogging() setupLogging()
log.Info("Running Serve (v2.7)...") // TODO make version string automatically the git tag (otherwise commit-hash)?
defer log.Info("Stopping Serve...")
srv, err := setupSshServer(host, port, host_key_path, users, name, args) srv, err := setupSshServer(host, port, host_key_path, users, name, args)
if err != nil { if err != nil {
log.Error("Could not start server", "error", err) log.Error("Could not start server", "error", err)