Log stderr stream from shadowsocks

This commit is contained in:
Quentin McGaw
2020-04-14 12:22:14 +00:00
parent 58459f0336
commit 422bd8d428
3 changed files with 7 additions and 6 deletions

View File

@@ -8,7 +8,7 @@ import (
"github.com/qdm12/private-internet-access-docker/internal/constants"
)
func (c *configurator) Start(server string, port uint16, password string, log bool) (stdout io.ReadCloser, waitFn func() error, err error) {
func (c *configurator) Start(server string, port uint16, password string, log bool) (stdout, stderr io.ReadCloser, waitFn func() error, err error) {
c.logger.Info("starting shadowsocks server")
args := []string{
"-c", string(constants.ShadowsocksConf),
@@ -18,8 +18,8 @@ func (c *configurator) Start(server string, port uint16, password string, log bo
if log {
args = append(args, "-v")
}
stdout, _, waitFn, err = c.commander.Start("ss-server", args...)
return stdout, waitFn, err
stdout, stderr, waitFn, err = c.commander.Start("ss-server", args...)
return stdout, stderr, waitFn, err
}
// Version obtains the version of the installed shadowsocks server