summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Maunz <andreas@maunz.de>2011-05-25 09:49:28 +0200
committerAndreas Maunz <andreas@maunz.de>2011-05-25 09:49:28 +0200
commit30de67d458310bc9550455cb1aef5d6908dd6c63 (patch)
tree362ceaaead854c2fe0e1f8fab0d318fa26d42a1b
parent29a3a7e7ce329f1a01861f407752270001882814 (diff)
Added update routine.
-rw-r--r--README19
1 files changed, 19 insertions, 0 deletions
diff --git a/README b/README
index 6746ce7..fdd5e6a 100644
--- a/README
+++ b/README
@@ -31,9 +31,28 @@ otconfig() {
source $HOME/.opentox-ui.sh
}
+# Update the development version
+otupdate() {
+ otconfig
+ cd $HOME/opentox-ruby/www/opentox
+ for d in `find -type d -maxdepth 1`; do echo $d ; cd $d ; git pull ; echo ; cd - ; done
+ cd opentox-ruby
+ rake install
+ LINK_DIR=`gem which opentox-ruby | sed 's/\/opentox-ruby.rb//'`
+ if ! [ -h $LINK_DIR ]; then
+ echo "Warning! Your lib $LINK_DIR is no symlink. Linking back for you..."
+ rm -rf "$LINK_DIR~"
+ mv "$LINK_DIR" "$LINK_DIR~" >>$LOG 2>&1
+ ln -sf $HOME/opentox-ruby/www/opentox/opentox-ruby/lib $GEM_LIB
+ fi
+ echo "Please execute 'otstart' to restart."
+}
+
+
# Start the server
otstart() {
otkill
+ sleep 8
sudo bash -c "source $HOME/.opentox-ui.sh; nohup redis-server $HOME/opentox-ruby/redis-2.2.2/redis.conf >/dev/null 2>&1 &"
sudo bash -c "source $HOME/.opentox-ui.sh; nohup nginx -c $HOME/opentox-ruby/nginx/conf/nginx.conf >/dev/null 2>&1 &"
sleep 2