Hello. I am working on updating my fio debian package. I chose to install the systemd service file for those who use a default Debian system with systemd.
However I also like to provide an init script for people who use Devuan or Debian with sysvinit. I started a quick hack on an init script, but seems start-stop-daemon does not really work as I thought it would. I attach my attempt to create an init script. /etc/init.d/fio start: - It starts fio as a service - It starts it twice (despite what the manpage of start-stop-daemon tells) - I am using "--background" option however /etc/init.d/fio stop: - It waits for 30 seconds, although fio responds to a TERM signal immediately - It then probably sends the KILL signal to it - It stops all fio processes, even a running fio client that runs a benchmark currently (zsh: killed fio ssd-test.fio31.9%][r=0KiB/s,w=73.1MiB/s] [r=0,w=18.7k IOPS][eta 01m:02s]) Of course I like it to just start one process, and stop exactly this process. It appears to me I have to write starting and stopping of myself instead of relying on /etc/init.d/skeleton (man init-d-script). It appears to me that when daemon process does not create PID file, then start-stop-daemon does not really appear to work as advertised in its manpage. That is where I ask for help: If anyone is experienced how to write init script for this case in a reliable way, feel free to, and I include it in the packaging as an alternative to the systemd service file. Current systemd service in use: [Unit] Description=Flexible I/O Tester as service After=network.target Documentation=man:fio(1) [Service] Type=simple ExecStart=/usr/bin/fio --server Thanks, -- Martin
fio
Description: application/shellscript
_______________________________________________ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng