repos / pico

pico services - prose.sh, pastes.sh, imgs.sh, feeds.sh, pgs.sh
git clone https://github.com/picosh/pico.git

commit
6f47199
parent
54ad488
author
Eric Bower
date
2024-07-08 16:23:26 +0000 UTC
chore: keep pgs ssh pprof
1 files changed,  +28, -0
A pgs-ssh-pprof.diff
+28, -0
 1@@ -0,0 +1,28 @@
 2+diff --git a/pgs/ssh.go b/pgs/ssh.go
 3+index 4d6b097..0bfb1cf 100644
 4+--- a/pgs/ssh.go
 5++++ b/pgs/ssh.go
 6+@@ -3,6 +3,7 @@ package pgs
 7+ import (
 8+ 	"context"
 9+ 	"fmt"
10++	"net/http"
11+ 	"os"
12+ 	"os/signal"
13+ 	"syscall"
14+@@ -113,9 +114,14 @@ func StartSshServer() {
15+ 		return
16+ 	}
17+ 
18++	logger.Info("starting SSH server on", "host", host, "port", port)
19++
20++	go func() {
21++        logger.Error("pprof", "err", http.ListenAndServe("0.0.0.0:6060", nil))
22++    }()
23++
24+ 	done := make(chan os.Signal, 1)
25+ 	signal.Notify(done, os.Interrupt, syscall.SIGINT, syscall.SIGTERM)
26+-	logger.Info("starting SSH server on", "host", host, "port", port)
27+ 	go func() {
28+ 		if err = s.ListenAndServe(); err != nil {
29+ 			logger.Error("serve", "err", err.Error())