summaryrefslogtreecommitdiff
blob: b69e4fa4e13fcd758a21c00585817d715296b1e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/sbin/runscript
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

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}" -1 "${I2PD_LOG}" /usr/bin/i2pd -- ${I2PDOPTIONS}
        eend $?
}

stop() {
        ebegin "Stopping ${SVCNAME}"
	start-stop-daemon -K -p "${I2PD_PID}"
        eend $?
}