summaryrefslogtreecommitdiff
blob: 89dab724a46c9c1a76064a09da58bd944b7e1360 (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
25
26
27
28
29
30
31
32
#!/sbin/runscript
# Copyright 2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-crypt/ekeyd/files/ekeyd.init,v 1.1 2009/09/28 10:59:07 flameeyes Exp $

INSTANCE="${SVCNAME#*.}"
if [ -z "${INSTANCE}" ] || [ "${SVCNAME}" = "ekeyd" ]; then
	INSTANCE="ekeyd"
fi

depend() {
	 use udev
}

start() {
	ebegin "Starting EntropyKey daemon"
	start-stop-daemon \
		--start --pidfile "/var/run/${SVCNAME}.pid" \
		--exec /usr/sbin/ekeyd -- \
		-f "/etc/entropykey/${INSTANCE}.conf" \
		-p "/var/run/${SVCNAME}.pid"
	eend $?
}

stop() {
	ebegin "Stopping EntropyKey daemon"
	start-stop-daemon \
		--stop --pidfile "/var/run/${SVCNAME}.pid" \
		--exec /usr/sbin/ekeyd
	eend $?
}