Sha256: 24d8cc06328a66bf59c795bb2ff86f3718b2847c743767f7cb5ac5c10e7d4979
Contents?: true
Size: 1008 Bytes
Versions: 13
Compression:
Stored size: 1008 Bytes
Contents
#!/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
Version data entries
13 entries across 13 versions & 1 rubygems