summaryrefslogtreecommitdiff
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
parent242d18cb8bcfbe3c38cfa38c6b380fda19584d81 (diff)
fixed load path with unicorn
-rw-r--r--Gemfile1
-rw-r--r--VERSION2
-rwxr-xr-xbin/lazar-start.sh3
-rwxr-xr-xbin/lazar-stop.sh13
-rw-r--r--lazar-gui.gemspec13
5 files changed, 24 insertions, 8 deletions
diff --git a/Gemfile b/Gemfile
index 775c2c4..7bade23 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,6 +1,7 @@
source "https://rubygems.org"
gemspec
gem "lazar"
+gem "gem-path"
gem "sinatra"
gem "haml"
gem "sass"
diff --git a/VERSION b/VERSION
index e3e1807..3eefcb9 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.9.8
+1.0.0
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
diff --git a/lazar-gui.gemspec b/lazar-gui.gemspec
index 6c83511..af5f0f9 100644
--- a/lazar-gui.gemspec
+++ b/lazar-gui.gemspec
@@ -13,12 +13,13 @@ Gem::Specification.new do |s|
s.rubyforge_project = "lazar-gui"
s.files = `git ls-files`.split("\n")
- s.add_runtime_dependency "lazar", "~> 0.9.3"
- s.add_runtime_dependency "sinatra", "~> 1.4.0"
- s.add_runtime_dependency "rdiscount", "~> 2.1.0"
- s.add_runtime_dependency "haml", "~> 4.0.0"
- s.add_runtime_dependency "sass", "~> 3.4.0"
- s.add_runtime_dependency "unicorn", "~> 5.1.0"
+ s.add_runtime_dependency "lazar", "~> 0.9.3", '>= 0.9.3'
+ s.add_runtime_dependency "gem-path", "~> 0.6.1", '>= 0.6.1'
+ s.add_runtime_dependency "sinatra", "~> 1.4.0", '>= 1.4.0'
+ s.add_runtime_dependency "rdiscount", "~> 2.1.0", '>= 2.1.0'
+ s.add_runtime_dependency "haml", "~> 4.0.0", '>= 4.0.0'
+ s.add_runtime_dependency "sass", "~> 3.4.0", '>= 3.4.0'
+ s.add_runtime_dependency "unicorn", "~> 5.1.0", '>= 5.1.0'
s.post_install_message = %q{
Service cmds: