summaryrefslogtreecommitdiff
path: root/jaildaemon.sh
diff options
context:
space:
mode:
Diffstat (limited to 'jaildaemon.sh')
-rwxr-xr-xjaildaemon.sh36
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
3echo Need a running jail with jid 1 for this test. Enter to proceed
4read a
5
6killall jaildaemon
7./jaildaemon -D
8
9# daemon comes back too fast, so uds is not yet open
10sleep 1
11./jaildaemon -j 1 -c '/usr/bin/touch /foo' -t Schnupsi -r
12
13echo -n "Killing (respawnin) task: "
14pgrep -f Schnupsi
15
16pkill -HUP -f Schnupsi
17
18echo "Yielding file, touched by task:"
19ls -al /foo
20
21echo "Deleting file"
22rm -r /foo
23
24echo
25echo -n "New task id: "
26pgrep -f Schnupsi
27
28echo "Killing with normal signal:"
29
30pkill -f Schnupsi
31
32echo "Expecting no file here:"
33ls -al /foo
34
35echo "Also expecting no command to match:"
36pgrep -f Schnupsi