diff options
Diffstat (limited to 'jaildaemon.sh')
-rwxr-xr-x | jaildaemon.sh | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/jaildaemon.sh b/jaildaemon.sh new file mode 100755 index 0000000..0741c23 --- /dev/null +++ b/jaildaemon.sh | |||
@@ -0,0 +1,36 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | echo Need a running jail with jid 1 for this test. Enter to proceed | ||
4 | read a | ||
5 | |||
6 | killall jaildaemon | ||
7 | ./jaildaemon -D | ||
8 | |||
9 | # daemon comes back too fast, so uds is not yet open | ||
10 | sleep 1 | ||
11 | ./jaildaemon -j 1 -c '/usr/bin/touch /foo' -t Schnupsi -r | ||
12 | |||
13 | echo -n "Killing (respawnin) task: " | ||
14 | pgrep -f Schnupsi | ||
15 | |||
16 | pkill -HUP -f Schnupsi | ||
17 | |||
18 | echo "Yielding file, touched by task:" | ||
19 | ls -al /foo | ||
20 | |||
21 | echo "Deleting file" | ||
22 | rm -r /foo | ||
23 | |||
24 | echo | ||
25 | echo -n "New task id: " | ||
26 | pgrep -f Schnupsi | ||
27 | |||
28 | echo "Killing with normal signal:" | ||
29 | |||
30 | pkill -f Schnupsi | ||
31 | |||
32 | echo "Expecting no file here:" | ||
33 | ls -al /foo | ||
34 | |||
35 | echo "Also expecting no command to match:" | ||
36 | pgrep -f Schnupsi | ||