sipt / shuttle

A web proxy in Golang with amazing features.
Apache License 2.0
2.07k stars 285 forks source link

openwrt中定义成服务启动异常 #72

Open zhaibin18 opened 5 years ago

zhaibin18 commented 5 years ago

!/bin/sh /etc/rc.common

PROCD_DEBUG=1 START=98 USE_PROCD=1

start_service() { procd_open_instance procd_set_param respawn procd_set_param command '/home/root/shuttle/shuttle' procd_append_param command '-c /home/root/shuttle/shuttle.yaml -l off -lp /home/root/log' procd_set_param stdout 1 # forward stdout of the command to logd procd_set_param stderr 1 # same for stderr procd_set_param env GIN_MODE=release procd_set_param env HOME=/home/root procd_set_param env LOGNAME=root procd_set_param env TERM=xterm procd_set_param env PWD=/home/root

    procd_close_instance

}

stop_service() { killall -9 shuttle }

restart() { stop start }

Tue Dec 18 09:01:54 2018 daemon.err shuttle[2146]: panic: user: Current not implemented on linux/amd64 Tue Dec 18 09:01:54 2018 daemon.err shuttle[2146]: Tue Dec 18 09:01:54 2018 daemon.err shuttle[2146]: goroutine 1 [running]: Tue Dec 18 09:01:54 2018 daemon.err shuttle[2146]: github.com/sipt/shuttle/extension/config.init.0() Tue Dec 18 09:01:54 2018 daemon.err shuttle[2146]: /Users/sipt/Documents/GOPATH/src/github.com/sipt/shuttle/extension/config/config_path.go:17 +0x20f Tue Dec 18 09:02:00 2018 daemon.err shuttle[2164]: panic: user: Current not implemented on linux/amd64 Tue Dec 18 09:02:00 2018 daemon.err shuttle[2164]: Tue Dec 18 09:02:00 2018 daemon.err shuttle[2164]: goroutine 1 [running]: Tue Dec 18 09:02:00 2018 daemon.err shuttle[2164]: github.com/sipt/shuttle/extension/config.init.0() Tue Dec 18 09:02:00 2018 daemon.err shuttle[2164]: /Users/sipt/Documents/GOPATH/src/github.com/sipt/shuttle/extension/config/config_path.go:17 +0x20f Tue Dec 18 09:02:05 2018 daemon.err shuttle[2179]: panic: user: Current not implemented on linux/amd64 Tue Dec 18 09:02:05 2018 daemon.err shuttle[2179]: Tue Dec 18 09:02:05 2018 daemon.err shuttle[2179]: goroutine 1 [running]: Tue Dec 18 09:02:05 2018 daemon.err shuttle[2179]: github.com/sipt/shuttle/extension/config.init.0() Tue Dec 18 09:02:05 2018 daemon.err shuttle[2179]: /Users/sipt/Documents/GOPATH/src/github.com/sipt/shuttle/extension/config/config_path.go:17 +0x20f

comzyh commented 5 years ago

procd_set_param env USER=root 试试?

zhaibin18 commented 5 years ago

跟 #73 是类似的问题,但是我加了 procd_set_param env USER=root还是不行。