summaryrefslogtreecommitdiffstats
path: root/examples/root/etc/init.d/sleeper
diff options
context:
space:
mode:
Diffstat (limited to 'examples/root/etc/init.d/sleeper')
-rwxr-xr-xexamples/root/etc/init.d/sleeper13
1 files changed, 10 insertions, 3 deletions
diff --git a/examples/root/etc/init.d/sleeper b/examples/root/etc/init.d/sleeper
index 7a6614087..4b91a381b 100755
--- a/examples/root/etc/init.d/sleeper
+++ b/examples/root/etc/init.d/sleeper
@@ -1,6 +1,11 @@
-#! /bin/sh
+#!/bin/sh
-PATH=$PATH:/home/luke/svn/blink/examples/root/bin
+# $Id$
+
+script=$0
+path=`echo $script | sed 's/etc..*/bin/'`
+
+PATH=$PATH:$path
case "$1" in
start)
@@ -10,7 +15,9 @@ case "$1" in
kill `ps -ef | grep -v grep | grep sleeper | grep perl | awk '{print $2}'`
;;
status)
- if sh -c "ps -ef | grep -v grep | grep -v init.d | grep sleeper"; then
+ output=`ps -ef | grep -v grep | grep -v init.d | grep sleeper`
+ retvalue=$?
+ if [ -n "$output" ]; then
exit 0
else
exit 1