Add software/init_scripts folder with sample init scripts

This commit is contained in:
Peter Hollows
2017-08-30 11:58:24 +10:00
parent 07efda146a
commit 6ce1386244
5 changed files with 48 additions and 1 deletions

View File

@@ -0,0 +1,12 @@
# Init scripts
Scripts in this folder are for use in systems where the Infnoise hardware is always present and the user wishes to run `infnoise` automatically as a system service with `--dev-random` enabled.
Should someone create distribution packages for infnoise in future, hopefully these will help!
## Contents
- `infnoise`: OpenRC, tested in Gentoo, untested in Alpine Linux, FreeBSD, TrueOS
- `infnoise.conf`: Upstart, tested in Ubuntu 14.04, 16.04 (requires upstart install)
- `infnoise.service`: Systemd, untested in Redhat, Ubuntu etc

View File

@@ -0,0 +1,12 @@
#!/sbin/openrc-run
description="infnoise - Feed entropy pool using the Infinite Noise TRNG"
pidfile="/var/run/infnoise.pid"
command="/usr/local/sbin/infnoise"
command_args="--dev-random"
start_stop_daemon_args="--make-pidfile --background"
depend() {
before urandom
provide random
}

View File

@@ -0,0 +1,13 @@
# infnoise
#
# Feed entropy pool using the Infinite Noise TRNG
description "Infinite Noise"
start on filesystem or runlevel [2345]
stop on runlevel [!2345]
respawn
respawn limit 10 5
exec /usr/local/sbin/infnoise --dev-random

View File

@@ -0,0 +1,10 @@
[Unit]
Description=Infinite Noise
[Service]
Type=simple
ExecStart=/usr/local/sbin/infnoise --dev-random
[Install]
WantedBy=multi-user.target