Sha256: 82e6d994ec633973bbeaa05a0eb1c1c10918ef52c757cca4045329bd892749fa

Contents?: true

Size: 983 Bytes

Versions: 9

Compression:

Stored size: 983 Bytes

Contents

#!/bin/bash
grep_lazar=`ps aux | grep -v grep | grep lazar-start`
grep_mongo=`ps aux | grep -v grep | grep mongod`
grep_rserve=`ps aux | grep -v grep | grep Rserve`
grep_unicorn=`ps aux | grep -v grep | grep unicorn`

# lazar
if [ ${#grep_lazar} -gt 0 ]
then
  PID=`ps ax | grep -v grep | grep lazar-start | awk '{ print $1 }'`
  for i in "${PID}"
  do
    `kill $i`
  done
else
  echo "Lazar is stopped."
fi

# mongod
if [ ${#grep_mongo} -gt 0 ]
then
  PID=`ps ax | grep -v grep | grep mongod | awk '{ print $1 }'`
  for i in "${PID}"
  do 
    `sudo kill $i`
  done
else
  echo "MongoDB is not running."
fi

# rserve
if [ ${#grep_rserve} -gt 0 ]
then
  PID=`ps ax | grep -v grep | grep Rserve | awk '{ print $1 }'`
  for i in "${PID}"
  do 
    `kill $i`
  done
else
  echo "Rserve is not running."
fi

# unicorn
if [ ${#grep_unicorn} -gt 0 ]
then
  PID=`ps ax | grep -v grep | grep unicorn | awk '{ print $1 }'`
  `kill ${PID[0]}`
else
  echo "Unicorn is not running."
fi

exit 0

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
lazar-gui-1.4.2 bin/lazar-stop.sh
lazar-gui-1.4.1 bin/lazar-stop.sh
lazar-gui-1.4.0 bin/lazar-stop.sh
lazar-gui-1.4.0.pre.0 bin/lazar-stop.sh
lazar-gui-1.3.1 bin/lazar-stop.sh
lazar-gui-1.1.3 bin/lazar-stop.sh
lazar-gui-1.0.2 bin/lazar-stop.sh
lazar-gui-1.0.1 bin/lazar-stop.sh
lazar-gui-1.0.0 bin/lazar-stop.sh