summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-crypt/ekey-egd-linux/files/ekey-egd-linux.init')
-rw-r--r--app-crypt/ekey-egd-linux/files/ekey-egd-linux.init30
1 files changed, 30 insertions, 0 deletions
diff --git a/app-crypt/ekey-egd-linux/files/ekey-egd-linux.init b/app-crypt/ekey-egd-linux/files/ekey-egd-linux.init
new file mode 100644
index 000000000000..ad9476e780c2
--- /dev/null
+++ b/app-crypt/ekey-egd-linux/files/ekey-egd-linux.init
@@ -0,0 +1,30 @@
+#!/sbin/runscript
+# Copyright 2009-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/ekey-egd-linux/files/ekey-egd-linux.init,v 1.1 2010/10/23 17:19:32 flameeyes Exp $
+
+depend() {
+ use net
+}
+
+start() {
+ ebegin "Starting EntropyKey EGD client"
+ start-stop-daemon \
+ --start --pidfile "/var/run/${SVCNAME}.pid" \
+ --exec /usr/libexec/ekey-egd-linux -- \
+ -H ${HOST} -p ${PORT} \
+ -r ${RECONNECTINTERVAL} \
+ -b ${BLOCKS} \
+ -D "/var/run/${SVCNAME}.pid"
+ sysctl kernel.random.write_wakeup_threshold=$WATERMARK >/dev/null 2>&1
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping EntropyKey EGD client"
+ start-stop-daemon \
+ --stop --pidfile "/var/run/${SVCNAME}.pid" \
+ --exec /usr/libexec/ekey-egd-linux
+ eend $?
+}
+