cleanup init_scripts directory
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015", SYMLINK+="infnoise"
|
||||
SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015", SYMLINK+="infnoise"
|
||||
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015" ,TAG+="systemd", ENV{SYSTEMD_WANTS}="infnoise.service"
|
||||
|
||||
@@ -8,5 +8,8 @@ Should someone create distribution packages for infnoise in future, hopefully th
|
||||
|
||||
- `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
|
||||
- `infnoise.service`: Systemd, works for CentOS, Ubuntu, Debian, ArchLinux
|
||||
- `infnoise.service.bin`: Same as infnoise.service, binary path = /usr/bin/
|
||||
- `infnoise.service.sbin`: Same as infnoise.service, binary path = /usr/sbin/
|
||||
- `75-infnoise.rules`: udev rule to be used together with the systemd service
|
||||
|
||||
|
||||
22
software/init_scripts/infnoise.openrc
Executable file
22
software/init_scripts/infnoise.openrc
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/sbin/openrc-run
|
||||
|
||||
PIDFILE=/run/infnoise.pid
|
||||
|
||||
depend() {
|
||||
need udev-settle localmount
|
||||
provide trng # Support need/use trng in other scripts
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting infnoise"
|
||||
/usr/local/sbin/infnoise --dev-random --daemon --pidfile $PIDFILE
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping infnoise"
|
||||
kill `cat $PIDFILE`
|
||||
RC=$?
|
||||
rm -f $PIDFILE
|
||||
eend $RC
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
[Unit]
|
||||
Description=Wayward Geek InfNoise TRNG driver
|
||||
BindsTo=dev-infnoise.device
|
||||
After=dev-infnoise.device
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
@@ -7,9 +9,7 @@ WorkingDirectory=/tmp
|
||||
ExecStart=/usr/local/sbin/infnoise --dev-random --daemon --pidfile /var/run/infnoise.pid
|
||||
User=root
|
||||
Group=root
|
||||
Restart=no
|
||||
BindsTo=dev-infnoise.device
|
||||
After=dev-infnoise.device
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
[Unit]
|
||||
Description=Wayward Geek InfNoise TRNG driver
|
||||
BindsTo=dev-infnoise.device
|
||||
After=dev-infnoise.device
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
@@ -7,9 +9,7 @@ WorkingDirectory=/tmp
|
||||
ExecStart=/usr/bin/infnoise --dev-random --daemon --pidfile /var/run/infnoise.pid
|
||||
User=root
|
||||
Group=root
|
||||
Restart=no
|
||||
BindsTo=dev-infnoise.device
|
||||
After=dev-infnoise.device
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
15
software/init_scripts/infnoise.service.sbin
Normal file
15
software/init_scripts/infnoise.service.sbin
Normal file
@@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=Wayward Geek InfNoise TRNG driver
|
||||
BindsTo=dev-infnoise.device
|
||||
After=dev-infnoise.device
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
WorkingDirectory=/tmp
|
||||
ExecStart=/usr/sbin/infnoise --dev-random --daemon --pidfile /var/run/infnoise.pid
|
||||
User=root
|
||||
Group=root
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user