summaryrefslogtreecommitdiff
path: root/bin/lazar-stop.sh
diff options
context:
space:
mode:
authorgebele <gebele@in-silico.ch>2016-06-08 06:46:46 +0000
committergebele <gebele@in-silico.ch>2016-06-08 06:46:46 +0000
commitc122a9d758bf96173f60fde0dbc2ae2b5b34b418 (patch)
treec978e754b56e5344ce921271f4433ba92af88d04 /bin/lazar-stop.sh
parent242d18cb8bcfbe3c38cfa38c6b380fda19584d81 (diff)
fixed load path with unicorn
Diffstat (limited to 'bin/lazar-stop.sh')
-rwxr-xr-xbin/lazar-stop.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/bin/lazar-stop.sh b/bin/lazar-stop.sh
index f5ba963..eea6815 100755
--- a/bin/lazar-stop.sh
+++ b/bin/lazar-stop.sh
@@ -1,8 +1,21 @@
#!/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