diff options
Diffstat (limited to 'examples/root/etc/init.d/sleeper')
-rwxr-xr-x | examples/root/etc/init.d/sleeper | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/examples/root/etc/init.d/sleeper b/examples/root/etc/init.d/sleeper deleted file mode 100755 index 6da5eae32..000000000 --- a/examples/root/etc/init.d/sleeper +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/bash - -# $Id$ - -script=$0 -path=`echo $script | sed 's/etc..*/bin/'` - -PATH=$PATH:$path - -ps=`facter ps` - -if [ -z "$ps" ]; then - ps="ps -ef" -fi - -function start -{ - cd $path - ./sleeper -} - -function stop -{ - #if [ -n `which pgrep` ]; then - # pid=`pgrep sleeper` - #else - pid=`$ps | grep -v grep | grep sleeper | grep ruby | awk '{print $2}'` - #fi - if [ -n "$pid" ]; then - kill $pid - fi -} - -function restart -{ - stop - start -} - -function status -{ - #if [ -n `which pgrep` ]; then - # cmd="pgrep sleeper" - #else - #cmd="$ps | grep -v grep | grep sleeper | grep ruby | awk '{print $2}'" - #fi - #$cmd - $ps | grep -v grep | grep sleeper | grep ruby -} - -case "$1" in - start) - start - ;; - stop) - stop - ;; - restart) - stop; start - ;; - status) - output=`status` - #status - exit $? - ;; - *) - echo "Usage: $N {start|stop|restart|force-reload}" >&2 - exit 1 - ;; -esac - -exit 0 |