commit: 3147f44d979ed1f4e63250186643682eb8c1be7b
Author: Andreas Zuber <a.zuber <AT> gmx <DOT> ch>
AuthorDate: Thu Jul 9 17:29:07 2020 +0000
Commit: Michael Egger <michael.egger <AT> tsn <DOT> at>
CommitDate: Thu Jul 9 18:38:49 2020 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=3147f44d
net-p2p/trezord-go: add openrc init script
Package-Manager: Portage-2.3.99, Repoman-2.3.23
Signed-off-by: Andreas Zuber <a.zuber <AT> gmx.ch>
Signed-off-by: Michael Egger <egger.m <AT> protonmail.com>
net-p2p/trezord-go/files/trezord-openrc.sh | 9 +++++++++
net-p2p/trezord-go/trezord-go-2.0.29.ebuild | 4 ++++
2 files changed, 13 insertions(+)
diff --git a/net-p2p/trezord-go/files/trezord-openrc.sh
b/net-p2p/trezord-go/files/trezord-openrc.sh
new file mode 100644
index 0000000..d245afc
--- /dev/null
+++ b/net-p2p/trezord-go/files/trezord-openrc.sh
@@ -0,0 +1,9 @@
+#!/sbin/openrc-run
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+command="/usr/bin/trezord"
+pidfile="/run/${RC_SVCNAME}.pid"
+command_args="-l /var/log/trezord/trezord.log"
+command_user="trezord"
+command_background=true
diff --git a/net-p2p/trezord-go/trezord-go-2.0.29.ebuild
b/net-p2p/trezord-go/trezord-go-2.0.29.ebuild
index 51c7e0b..1edb81e 100644
--- a/net-p2p/trezord-go/trezord-go-2.0.29.ebuild
+++ b/net-p2p/trezord-go/trezord-go-2.0.29.ebuild
@@ -24,6 +24,10 @@ DEPEND="
src_install() {
newbin trezord-go trezord
+ newinitd "${FILESDIR}/trezord-openrc.sh" trezord
+ keepdir /var/log/trezord
+ fowners trezord:root /var/log/trezord
+
use systemd && systemd_dounit
src/github.com/trezor/trezord-go/release/linux/trezord.service
use udev && udev_dorules
src/github.com/trezor/trezord-go/release/linux/trezor.rules
}