summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/i2pd/files/i2pd-2.5.0.initd')
-rw-r--r--net-misc/i2pd/files/i2pd-2.5.0.initd26
1 files changed, 26 insertions, 0 deletions
diff --git a/net-misc/i2pd/files/i2pd-2.5.0.initd b/net-misc/i2pd/files/i2pd-2.5.0.initd
new file mode 100644
index 000000000000..6c1d4b7280f7
--- /dev/null
+++ b/net-misc/i2pd/files/i2pd-2.5.0.initd
@@ -0,0 +1,26 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+description="C++ daemon for accessing the I2P network"
+
+depend() {
+ use dns logger netmount
+}
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+ checkpath -f "${I2PD_LOG}" -o "${I2PD_USER}:${I2PD_GROUP}"
+ checkpath -f "${I2PD_PID}" -o "${I2PD_USER}:${I2PD_GROUP}"
+ start-stop-daemon -S -b -u "${I2PD_USER}:${I2PD_GROUP}" /usr/bin/i2pd -- ${I2PDOPTIONS}
+ sleep 1
+ [ -e "$I2PD_PID" -a -e /proc/$(cat "$I2PD_PID") ]
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon -K -p "${I2PD_PID}" -R SIGTERM/20 SIGKILL/20 -P
+ eend $?
+}