blob: 6ccde1190a54be6729a55aab51be5a258f59d6c2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/bin/sh
rm -rf "${ctmp}"
runsvstat
echo $?
runsvstat -V
echo $?
mkdir "${ctmp}"
echo '#!/bin/sh' >"${ctmp}"/run
echo 'echo starting' >>"${ctmp}"/run
echo 'exec sleep 14' >>"${ctmp}"/run
chmod 700 "${ctmp}"/run
chpst -2 runsvstat "${ctmp}"
echo $?
runsv "${ctmp}" &
sleep 1
test -r "${ctmp}"/supervise/stat || sleep 2
chpst -1 runsvstat "${ctmp}"
echo $?
runsvctrl exit "${ctmp}"
wait
echo $?
chpst -2 runsvstat "${ctmp}"
echo $?
rm -rf "${ctmp}"
|