summary refs log tree commit diff
path: root/src/runsvctrl.check
diff options
context:
space:
mode:
Diffstat (limited to 'src/runsvctrl.check')
-rwxr-xr-xsrc/runsvctrl.check23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/runsvctrl.check b/src/runsvctrl.check
new file mode 100755
index 0000000..7911074
--- /dev/null
+++ b/src/runsvctrl.check
@@ -0,0 +1,23 @@
+#!/bin/sh
+rm -rf "${ctmp}"
+
+runsvctrl
+echo $?
+
+mkdir "${ctmp}"
+echo '#!/bin/sh' >"${ctmp}"/run
+echo 'echo starting' >>"${ctmp}"/run
+echo 'exec sleep 14' >>"${ctmp}"/run
+chmod 700 "${ctmp}"/run
+runsv "${ctmp}" &
+sleep 1
+test -r "${ctmp}"/supervise/stat || sleep 2
+runsvctrl down "${ctmp}"
+echo $?
+sleep 1
+cat "${ctmp}"/supervise/stat
+runsvctrl exit "${ctmp}"
+echo $?
+wait
+echo $?
+rm -rf "${ctmp}"