net-misc/stayrtr: caps and init fix
Signed-off-by: Alarig Le Lay <alarig@swordarmor.fr>
This commit is contained in:
parent
8ac6e208b0
commit
f357e5fe94
2 changed files with 17 additions and 1 deletions
|
@ -6,8 +6,17 @@ name="stayrtr daemon"
|
|||
description="RPKI-To-Router server implementation in Go"
|
||||
command=/usr/bin/stayrtr
|
||||
command_args="${STAYRTR_OPTS}"
|
||||
pidfile="/run/${RC_SVCNAME}.pid"
|
||||
command_background=true
|
||||
start_stop_daemon_args="--user ${RC_SVCNAME} --group ${RC_SVCNAME} \
|
||||
--stdout /var/log/${RC_SVCNAME}.log \
|
||||
--stderr /var/log/${RC_SVCNAME}.log"
|
||||
|
||||
depend() {
|
||||
use net
|
||||
use logger
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
checkpath -f -m 0755 -o ${RC_SVCNAME}:${RC_SVCNAME} "/var/log/${RC_SVCNAME}.log"
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
EAPI=8
|
||||
|
||||
inherit go-module systemd
|
||||
inherit fcaps go-module systemd
|
||||
|
||||
DESCRIPTION="RPKI-To-Router server implementation in Go"
|
||||
HOMEPAGE="https://github.com/bgp/stayrtr"
|
||||
|
@ -21,6 +21,13 @@ RDEPEND="
|
|||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
|
||||
FILECAPS=(
|
||||
CAP_NET_ADMIN usr/bin/stayrtr
|
||||
CAP_NET_BIND_SERVICE usr/bin/stayrtr
|
||||
CAP_NET_RAW usr/bin/stayrtr
|
||||
)
|
||||
|
||||
src_compile() {
|
||||
ego build -trimpath -ldflags "-X main.version=${PV}" ${GOFLAGS} ./cmd/stayrtr/stayrtr.go
|
||||
ego build -trimpath -ldflags "-X main.version=${PV}" ${GOFLAGS} ./cmd/rtrdump/rtrdump.go
|
||||
|
|
Loading…
Reference in a new issue