Add software/init_scripts folder with sample init scripts
This commit is contained in:
12
software/init_scripts/README.md
Normal file
12
software/init_scripts/README.md
Normal 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
|
||||
|
||||
12
software/init_scripts/infnoise
Normal file
12
software/init_scripts/infnoise
Normal 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
|
||||
}
|
||||
13
software/init_scripts/infnoise.conf
Normal file
13
software/init_scripts/infnoise.conf
Normal 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
|
||||
10
software/init_scripts/infnoise.service
Normal file
10
software/init_scripts/infnoise.service
Normal file
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Infinite Noise
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/local/sbin/infnoise --dev-random
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
Reference in New Issue
Block a user