mirror of
https://github.com/troglobit/finit.git
synced 2026-10-09 16:50:59 +07:00
We extend the service.sh to emulate a well behaving service that creates and removes its own PID file. The new test emulates a crash by sending SIGKILL to service.sh. We then verify that Finit restarts it, and eventually registers the new PID when the services recreates the PID file. Issue #226 Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
12 lines
99 B
Bash
Executable File
12 lines
99 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -eu
|
|
|
|
echo $$ > /run/service.pid
|
|
|
|
while true; do
|
|
sleep 5
|
|
done
|
|
|
|
rm /run/service.pid
|