diff options
author | Gerrit Pape <pape@smarden.org> | 2005-07-23 13:12:39 +0000 |
---|---|---|
committer | Gerrit Pape <pape@smarden.org> | 2005-07-23 13:12:39 +0000 |
commit | d7f290365ad66a00913fb60a942b1e4075fc81c2 (patch) | |
tree | d840e9fb86227c766babe4a62286829058f5e017 /src/sv.check | |
parent | 8ef856eff7a3e73d7df7784aacbcd53c0e871b0e (diff) | |
download | runit-d7f290365ad66a00913fb60a942b1e4075fc81c2.tar.gz runit-d7f290365ad66a00913fb60a942b1e4075fc81c2.tar.xz runit-d7f290365ad66a00913fb60a942b1e4075fc81c2.zip |
minimal sv.check.
Diffstat (limited to 'src/sv.check')
-rwxr-xr-x | src/sv.check | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/sv.check b/src/sv.check new file mode 100755 index 0000000..a778719 --- /dev/null +++ b/src/sv.check @@ -0,0 +1,25 @@ +#!/bin/sh +rm -rf "${ctmp}" +trap 'rm -rf "${ctmp}"' EXIT + +sv +echo $? + +mkdir "${ctmp}" +cat >"${ctmp}"/run <<-\EOT + #!/bin/sh + echo starting + exec sleep 14 + EOT +chmod 700 "${ctmp}"/run +runsv "${ctmp}" & +sleep 1 +test -r "${ctmp}"/supervise/stat || sleep 2 +sv down "${ctmp}" +echo $? +sleep 1 +cat "${ctmp}"/supervise/stat +sv exit "${ctmp}" +echo $? +wait +echo $? |