summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/lazar-start.sh3
-rwxr-xr-xbin/lazar-stop.sh13
2 files changed, 15 insertions, 1 deletions
diff --git a/bin/lazar-start.sh b/bin/lazar-start.sh
index 72facbb..9072150 100755
--- a/bin/lazar-start.sh
+++ b/bin/lazar-start.sh
@@ -1,7 +1,8 @@
#!/bin/bash
-lazar-stop
sudo mongod &
R CMD Rserve
+LAZARPATH=$(gem path lazar-gui)
+cd $LAZARPATH
unicorn -c unicorn.rb -E production -D
exit 0
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