diff options
| author | Shulhan <ms@kilabit.info> | 2026-02-02 22:31:42 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2026-02-03 17:51:15 +0700 |
| commit | 7e7ed646e2c3db2404b628e5e8b5584b9de0ff60 (patch) | |
| tree | b03344635a0006e2386c3bb451c3316333346a3c /awwan.go | |
| parent | a6e71dc31738c4a003dae9f9547348968beeefc4 (diff) | |
| download | awwan-7e7ed646e2c3db2404b628e5e8b5584b9de0ff60.tar.xz | |
cmd/awwan: implement socket based activation on serve command
The "awwan serve" command now can run based on socket activation under
systemd.
Diffstat (limited to 'awwan.go')
| -rw-r--r-- | awwan.go | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -7,6 +7,7 @@ import ( "context" "fmt" "log" + "net" "os" "path/filepath" "strconv" @@ -483,14 +484,14 @@ out: } // Serve start the web-user interface that serve awwan through HTTP. -func (aww *Awwan) Serve(address string, isDev bool) (err error) { +func (aww *Awwan) Serve(listener net.Listener, address string, isDev bool) (err error) { var logp = `Serve` if isDev { go internal.Watch() } - aww.httpd, err = newHTTPServer(aww, address) + aww.httpd, err = newHTTPServer(aww, listener, address) if err != nil { return fmt.Errorf(`%s: %w`, logp, err) } |
