summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-vpn')
-rw-r--r--net-vpn/i2p/files/1.7.0-i2p.init17
-rw-r--r--net-vpn/i2p/files/1.7.0-i2p.service10
-rw-r--r--net-vpn/i2p/i2p-1.7.0-r1.ebuild (renamed from net-vpn/i2p/i2p-1.7.0.ebuild)14
3 files changed, 31 insertions, 10 deletions
diff --git a/net-vpn/i2p/files/1.7.0-i2p.init b/net-vpn/i2p/files/1.7.0-i2p.init
new file mode 100644
index 000000000000..d59899b899e9
--- /dev/null
+++ b/net-vpn/i2p/files/1.7.0-i2p.init
@@ -0,0 +1,17 @@
+#!/sbin/openrc-run
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+readonly WRAPPER_CONF="/usr/share/i2p/wrapper.config"
+
+command=wrapper
+command_args="$WRAPPER_CONF wrapper.syslog.ident=i2p"
+command_background=true
+command_progress=true
+command_user=i2p
+pidfile=/var/run/i2p.pid
+retry='SIGTERM/20 SIGKILL/20'
diff --git a/net-vpn/i2p/files/1.7.0-i2p.service b/net-vpn/i2p/files/1.7.0-i2p.service
new file mode 100644
index 000000000000..87c218075a1c
--- /dev/null
+++ b/net-vpn/i2p/files/1.7.0-i2p.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Invisible Internet Project
+After=network.target
+
+[Service]
+User=i2p
+ExecStart=/usr/bin/wrapper /usr/share/i2p/wrapper.config wrapper.syslog.ident=i2p wrapper.logfile=/var/lib/i2p/.i2p/wrapper.log
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-vpn/i2p/i2p-1.7.0.ebuild b/net-vpn/i2p/i2p-1.7.0-r1.ebuild
index 5914fa6ea733..16802953f72a 100644
--- a/net-vpn/i2p/i2p-1.7.0.ebuild
+++ b/net-vpn/i2p/i2p-1.7.0-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -69,14 +69,8 @@ src_prepare() {
installer/resources/clients.config || die
# generate wrapper classpath, keeping the default to be replaced later
- i2p_cp="" # global forced by java-pkg_gen-cp
- java-pkg_gen-cp i2p_cp
- local lib i=2
local classpath="wrapper.java.classpath.1=${EPREFIX}/usr/share/i2p/lib/*\n"
- for lib in ${i2p_cp//,/ }
- do
- classpath+="wrapper.java.classpath.$((i++))=$(java-pkg_getjars ${lib})\n"
- done
+ classpath+="wrapper.java.classpath.2=$(java-pkg_getjars java-service-wrapper)\n"
# add generated classpath, hardcode system VM, setting system's conf
sed -e "s|\(wrapper\.java\.classpath\.1\)=.*|${classpath}|" \
@@ -132,8 +126,8 @@ src_install() {
java-pkg_dowar webapps/*.war
# Install daemon files
- newinitd "${FILESDIR}/i2p.init" i2p
- systemd_dounit "${FILESDIR}/i2p.service"
+ newinitd "${FILESDIR}/${PV}-i2p.init" i2p
+ systemd_dounit "${FILESDIR}/${PV}-i2p.service"
# setup log
keepdir /var/log/i2p