diff options
author | Arthur W. Green <awg@posteo.us> | 2016-11-30 20:30:57 +0000 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2016-12-03 07:17:45 +0700 |
commit | d20e4d268ae7a2f370b7e80e3d4f70e0085a0921 (patch) | |
tree | 7bc2a03fcbe3dec87cd52ffd606bae39ec7087f3 /system/bit-babbler/rc.seedd.new | |
parent | f4ba03f021ab3ef7321f5e2daba474ae7ceab290 (diff) |
system/bit-babbler: Updated for version 0.6.
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'system/bit-babbler/rc.seedd.new')
-rw-r--r-- | system/bit-babbler/rc.seedd.new | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/system/bit-babbler/rc.seedd.new b/system/bit-babbler/rc.seedd.new new file mode 100644 index 0000000000000..a31d035c257ea --- /dev/null +++ b/system/bit-babbler/rc.seedd.new @@ -0,0 +1,41 @@ +#!/bin/sh +# /etc/rc.d/rc.seedd: start and stop BitBabbler TRNG(s). +# +# Revised 1 November 2016 + +seedd_start() { + if [ -S /var/run/bit-babbler/seedd.socket ]; then + echo 'seedd appears to be already running!' + else + echo 'Checking for BitBabbler(s)...' + /usr/bin/seedd --scan + echo 'Starting seedd: /usr/bin/seedd --daemon --kernel' + /usr/bin/seedd --daemon --kernel + fi +} + +seedd_stop() { + echo 'Stopping seedd...' + killall -w seedd + rm -f /var/run/bit-babbler/seedd.socket.lock +} + +seedd_restart() { + seedd_stop + sleep 2 + seedd_start +} + +case "$1" in +'start') + seedd_start + ;; +'stop') + seedd_stop + ;; +'restart') + seedd_restart + ;; +*) + echo "usage $0 start|stop|restart" +esac |