Sha256: 617f2689c020e5974fcfef9d1b6331a0bc0cf0d65385ae3e380ac08ed77fc570
Contents?: true
Size: 1000 Bytes
Versions: 58
Compression:
Stored size: 1000 Bytes
Contents
#!/bin/bash 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
58 entries across 58 versions & 3 rubygems