From cdd36f96a0e2c66a63d033b79a4608644c609cbb Mon Sep 17 00:00:00 2001 From: davor Date: Thu, 28 Feb 2013 15:59:22 +0100 Subject: Update ot-tools-user.sh Increased sleep time for 4s backend startup --- ot-tools-user.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ot-tools-user.sh b/ot-tools-user.sh index 47f0f66..e4875e8 100644 --- a/ot-tools-user.sh +++ b/ot-tools-user.sh @@ -27,7 +27,7 @@ start_unicorn() { # @example start_unicorn algorithm 8081 start_4s() { nice bash -c "nohup $OT_PREFIX/4S/bin/4s-backend $1 >/dev/null 2>&1 &"; - sleep 2; + sleep 4; nice bash -c "nohup $OT_PREFIX/4S/bin/4s-httpd -H localhost -p $2 -s -1 $1 >/dev/null 2>&1 &"; #-D for testing sleep 1; -- cgit v1.2.3 From b138a2c8ac7ea07e3374f8439d04e63f6acfb4dd Mon Sep 17 00:00:00 2001 From: rautenberg Date: Mon, 15 Apr 2013 12:08:59 +0200 Subject: 4store also for external use --- ot-tools-user.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ot-tools-user.sh b/ot-tools-user.sh index e4875e8..8fa4096 100644 --- a/ot-tools-user.sh +++ b/ot-tools-user.sh @@ -28,7 +28,7 @@ start_unicorn() { start_4s() { nice bash -c "nohup $OT_PREFIX/4S/bin/4s-backend $1 >/dev/null 2>&1 &"; sleep 4; - nice bash -c "nohup $OT_PREFIX/4S/bin/4s-httpd -H localhost -p $2 -s -1 $1 >/dev/null 2>&1 &"; #-D for testing + nice bash -c "nohup $OT_PREFIX/4S/bin/4s-httpd -p $2 -s -1 $1 >/dev/null 2>&1 &"; #-D for testing sleep 1; } -- cgit v1.2.3 From 7fb130b9565f01215843c39d8cdfe036bef0ceb6 Mon Sep 17 00:00:00 2001 From: rautenberg Date: Fri, 19 Apr 2013 13:54:08 +0200 Subject: installation with ruby 2.0.0-p0 --- config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.sh b/config.sh index 9cdbca7..9636bde 100755 --- a/config.sh +++ b/config.sh @@ -19,7 +19,7 @@ OB_NUM_VER="2.3.1" RAPTOR2_NUM_VER="2.0.8" RASQAL_NUM_VER="0.9.29" REDIS_NUM_VER="2.4.4" -RUBY_NUM_VER="1.9.3-p194" +RUBY_NUM_VER="2.0.0-p0" FOUR_STORE_VER="4store-v1.1.5" REDIS_URL="http://redis.googlecode.com/files" REDLAND_DWL="http://download.librdf.org" -- cgit v1.2.3 From 8685abfd1cb8857bce5b2bfa7ef943a8c7456363 Mon Sep 17 00:00:00 2001 From: rautenberg Date: Fri, 19 Apr 2013 14:50:11 +0200 Subject: installation with ruby 2.0.0-p0 --- config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.sh b/config.sh index 9636bde..38e7772 100755 --- a/config.sh +++ b/config.sh @@ -50,7 +50,7 @@ REDIS_VER="redis-$REDIS_NUM_VER" OB_DEST="$OT_PREFIX/$OB_VER" OB_DEST_BINDINGS="$OT_PREFIX/openbabel-ruby-install" R_DEST="$OT_PREFIX/r-packages" -RUBY_DWL="http://ftp.ruby-lang.org/pub/ruby/1.9" +RUBY_DWL="http://ftp.ruby-lang.org/pub/ruby/2.0" RAPTOR2_DWL="$REDLAND_DWL/source/$RAPTOR2_VER.tar.gz" RASQAL_DWL="$REDLAND_DWL/source/$RASQAL_VER.tar.gz" REDIS_DWL="$REDIS_URL/$REDIS_VER.tar.gz" -- cgit v1.2.3 From f57f6af85419477c5d5dd3c80c19656f67b68926 Mon Sep 17 00:00:00 2001 From: davor Date: Wed, 24 Apr 2013 15:49:11 +0300 Subject: Update ot-tools-user.sh Disable otcheck and otreload --- ot-tools-user.sh | 264 +++++++++++++++++++++++++++---------------------------- 1 file changed, 132 insertions(+), 132 deletions(-) diff --git a/ot-tools-user.sh b/ot-tools-user.sh index 8fa4096..1b4f8df 100644 --- a/ot-tools-user.sh +++ b/ot-tools-user.sh @@ -50,9 +50,9 @@ _ottoolcompletion() ' "$word")) ; } complete -o default -F _ottoolcompletion otstart -complete -o default -F _ottoolcompletion otreload +#complete -o default -F _ottoolcompletion otreload complete -o default -F _ottoolcompletion otkill -complete -o default -F _ottoolcompletion otcheck +#complete -o default -F _ottoolcompletion otcheck # Start the server otstart() { @@ -95,62 +95,62 @@ otstart() { # reload unicorn # @param1 integer Port # @example reload_unicorn 8081 -reload_unicorn() { - for p in `ps x | grep 'unicorn master' | grep $1 | grep -v grep | awk '{print $1}'`; do - kill -12 $p - done - sleep 0.5 - for p in `ps x | grep 'unicorn master (old)' | grep $1 | grep -v grep | awk '{print $1}'`; do - kill -28 $p - done - sleep 0.5 - # ToDo: Check if new master is working properly. - for p in `ps x | grep 'unicorn master (old)' | grep $1 | grep -v grep | awk '{print $1}'`; do - kill -3 $p - done -} +#reload_unicorn() { +# for p in `ps x | grep 'unicorn master' | grep $1 | grep -v grep | awk '{print $1}'`; do +# kill -12 $p +# done +# sleep 0.5 +# for p in `ps x | grep 'unicorn master (old)' | grep $1 | grep -v grep | awk '{print $1}'`; do +# kill -28 $p +# done +# sleep 0.5 +# # ToDo: Check if new master is working properly. +# for p in `ps x | grep 'unicorn master (old)' | grep $1 | grep -v grep | awk '{print $1}'`; do +# kill -3 $p +# done +#} # Reload the server -otreload() { - if [ $# != 1 ]; then - echo "One argument required: [service_name] or 'all'" - echo "usage: otreload [all|algorithm|compound|dataset|feature|model|task|validation|4store]" - return 1 - fi - - otconfig - case "$1" in - "algorithm") reload_unicorn 8081; - check_service "algorithm";; - "compound") reload_unicorn 8082; - check_service "compound";; - "dataset") reload_unicorn 8083; - check_service "dataset";; - "feature") reload_unicorn 8084; - check_service "feature";; - "model") reload_unicorn 8085; - check_service "model";; - "task") reload_unicorn 8086; - check_service "task";; - "validation") reload_unicorn 8087; - check_service "validation";; - "4store") #killall 4s-httpd >/dev/null 2>&1; - #killall 4s-backend >/dev/null 2>&1; - #check_service "four_store";; - echo "$1 reload not available yet.";; - "all") otreload algorithm; - otreload compound; - otreload dataset; - otreload feature; - otreload model; - otreload task; - otrelaod validation;; - #otreload 4store;; - *) echo "One argument required: [service_name] or 'all'"; - echo "usage: otreload [all|algorithm|compound|dataset|feature|model|task|validation|4store]"; - return 1;; - esac -} +#otreload() { +# if [ $# != 1 ]; then +# echo "One argument required: [service_name] or 'all'" +# echo "usage: otreload [all|algorithm|compound|dataset|feature|model|task|validation|4store]" +# return 1 +# fi +# +# otconfig +# case "$1" in +# "algorithm") reload_unicorn 8081; +# check_service "algorithm";; +# "compound") reload_unicorn 8082; +# check_service "compound";; +# "dataset") reload_unicorn 8083; +# check_service "dataset";; +# "feature") reload_unicorn 8084; +# check_service "feature";; +# "model") reload_unicorn 8085; +# check_service "model";; +# "task") reload_unicorn 8086; +# check_service "task";; +# "validation") reload_unicorn 8087; +# check_service "validation";; +# "4store") #killall 4s-httpd >/dev/null 2>&1; +# #killall 4s-backend >/dev/null 2>&1; +# #check_service "four_store";; +# echo "$1 reload not available yet.";; +# "all") otreload algorithm; +# otreload compound; +# otreload dataset; +# otreload feature; +# otreload model; +# otreload task; +# otrelaod validation;; +# #otreload 4store;; +# *) echo "One argument required: [service_name] or 'all'"; +# echo "usage: otreload [all|algorithm|compound|dataset|feature|model|task|validation|4store]"; +# return 1;; +# esac +#} # kill unicorn # @param1 integer Port @@ -197,85 +197,85 @@ otkill() { # sets $SERVICE_URI if found in config files # @param1 string [service_name] # @example get_service_uri algorithm -get_service_uri() { - if [ $# != 1 ]; then - echo "One argument required: [service_name]" - echo "usage: get_service_uri [algorithm|compound|dataset|feature|model|task|validation|four_store]" - return 1 - fi - SERVICE_URI="" - - if [ -f $HOME/.opentox/config/$1.rb ]; then - SERVICE_URI=`cat $HOME/.opentox/config/$1.rb | grep $1 | grep "uri" | awk -F":uri => " '{print $2}' | awk -F" " '{print $1}' | awk -F"," '{print $1}' | sed "s/'//g" | sed 's/"//g'` - fi - - if [ -f $HOME/.opentox/config/default.rb ]; then - [ -n "$SERVICE_URI" ] || SERVICE_URI=`cat $HOME/.opentox/config/default.rb | grep $1 | grep "uri" | awk -F":uri => " '{print $2}' | awk -F" " '{print $1}' | awk -F"," '{print $1}' | sed "s/'//g" | sed 's/"//g'` - fi - - if [ -z "$SERVICE_URI" ]; then - echo "Cannot find service uri for $1 in config files." - return 1 - else - return 0 - fi -} +#get_service_uri() { +# if [ $# != 1 ]; then +# echo "One argument required: [service_name]" +# echo "usage: get_service_uri [algorithm|compound|dataset|feature|model|task|validation|four_store]" +# return 1 +# fi +# SERVICE_URI="" +# +# if [ -f $HOME/.opentox/config/$1.rb ]; then +# SERVICE_URI=`cat $HOME/.opentox/config/$1.rb | grep $1 | grep "uri" | awk -F":uri => " '{print $2}' | awk -F" " '{print $1}' | awk -F"," '{print $1}' | sed "s/'//g" | sed 's/"//g'` +# fi +# +# if [ -f $HOME/.opentox/config/default.rb ]; then +# [ -n "$SERVICE_URI" ] || SERVICE_URI=`cat $HOME/.opentox/config/default.rb | grep $1 | grep "uri" | awk -F":uri => " '{print $2}' | awk -F" " '{print $1}' | awk -F"," '{print $1}' | sed "s/'//g" | sed 's/"//g'` +# fi +# +# if [ -z "$SERVICE_URI" ]; then +# echo "Cannot find service uri for $1 in config files." +# return 1 +# else +# return 0 +# fi +#} # check service # @param1 string [service_name] # @example check_service algorithm -check_service() { - check_utils "curl" - if [ $# != 1 ]; then - echo "One argument required: [service_name]" - echo "usage: get_service_uri [algorithm|compound|dataset|feature|model|task|validation|four_store]" - return 1 - fi - get_service_uri $1 - HEADER="Accept: */*" - if [ $1 == "four_store" ]; then - SERVICE_URI="$SERVICE_URI""/status/" - fi - if [ $1 == "compound" ]; then - SERVICE_URI="$SERVICE_URI""/InChI=1S/BF4.Na/c2-1(3,4)5;/q-1;+1" - HEADER="Accept: chemical/x-inchi" - fi - if [ -n "`$CURL -v -H "$HEADER" $SERVICE_URI 2>&1 | grep '200 OK'`" ]; then - return 0 - else - echo "$1 is not available at $SERVICE_URI." - return 1 - fi -} +#check_service() { +# check_utils "curl" +# if [ $# != 1 ]; then +# echo "One argument required: [service_name]" +# echo "usage: get_service_uri [algorithm|compound|dataset|feature|model|task|validation|four_store]" +# return 1 +# fi +# get_service_uri $1 +# HEADER="Accept: */*" +# if [ $1 == "four_store" ]; then +# SERVICE_URI="$SERVICE_URI""/status/" +# fi +# if [ $1 == "compound" ]; then +# SERVICE_URI="$SERVICE_URI""/InChI=1S/BF4.Na/c2-1(3,4)5;/q-1;+1" +# HEADER="Accept: chemical/x-inchi" +# fi +# if [ -n "`$CURL -v -H "$HEADER" $SERVICE_URI 2>&1 | grep '200 OK'`" ]; then +# return 0 +# else +# echo "$1 is not available at $SERVICE_URI." +# return 1 +# fi +#} # Check the server -otcheck() { - if [ $# != 1 ]; then - echo "One argument required: [service_name] or 'all'" - echo "usage: otcheck [all|algorithm|compound|dataset|feature|model|task|validation|4store]" - return 1 - fi - - otconfig - case "$1" in - "algorithm") check_service "algorithm";; - "compound") check_service "compound";; - "dataset") check_service "dataset";; - "feature") check_service "feature";; - "model") check_service "model";; - "task") check_service "task";; - "validation") check_service "validation";; - "4store") check_service "four_store";; - "all") otcheck "algorithm"; - otcheck "compound"; - otcheck "dataset"; - otcheck "feature"; - otcheck "model"; - otcheck "task"; - otcheck "validation"; - otcheck 4store;; - *) echo "One argument required: [service_name] or 'all'"; - echo "usage: otcheck [all|algorithm|compound|dataset|feature|model|task|validation|4store]"; - return 1;; - esac -} +#otcheck() { +# if [ $# != 1 ]; then +# echo "One argument required: [service_name] or 'all'" +# echo "usage: otcheck [all|algorithm|compound|dataset|feature|model|task|validation|4store]" +# return 1 +# fi +# +# otconfig +# case "$1" in +# "algorithm") check_service "algorithm";; +# "compound") check_service "compound";; +# "dataset") check_service "dataset";; +# "feature") check_service "feature";; +# "model") check_service "model";; +# "task") check_service "task";; +# "validation") check_service "validation";; +# "4store") check_service "four_store";; +# "all") otcheck "algorithm"; +# otcheck "compound"; +# otcheck "dataset"; +# otcheck "feature"; +# otcheck "model"; +# otcheck "task"; +# otcheck "validation"; +# otcheck 4store;; +# *) echo "One argument required: [service_name] or 'all'"; +# echo "usage: otcheck [all|algorithm|compound|dataset|feature|model|task|validation|4store]"; +# return 1;; +# esac +#} -- cgit v1.2.3 From f15372dd99f6297e7c1814831159f92f15a9e6b6 Mon Sep 17 00:00:00 2001 From: davor Date: Fri, 26 Apr 2013 13:45:01 +0300 Subject: Start algorithm after compound/feature service --- ot-tools-user.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ot-tools-user.sh b/ot-tools-user.sh index 1b4f8df..15b46a7 100644 --- a/ot-tools-user.sh +++ b/ot-tools-user.sh @@ -66,7 +66,11 @@ otstart() { otkill $1 DIR=`pwd` case "$1" in - "algorithm") start_unicorn $1 8081;; + "algorithm") otkill compound; + otkill feature; + otstart compound; + otstart feature; + start_unicorn $1 8081;; "compound") start_unicorn $1 8082;; "dataset") start_unicorn $1 8083;; "feature") start_unicorn $1 8084;; @@ -78,12 +82,12 @@ otstart() { if ! pgrep -u $USER 4s-backend>/dev/null 2>&1; then echo "Failed to start 4s-backend."; fi if ! pgrep -u $USER 4s-httpd>/dev/null 2>&1; then echo "Failed to start 4s-httpd."; fi;; "all") otstart 4store; - otstart algorithm; otstart compound; otstart dataset; otstart feature; otstart model; otstart task; + otstart algorithm; otstart validation;; *) echo "One argument required: [service_name] or 'all'"; echo "usage: otstart [all|algorithm|compound|dataset|feature|model|task|validation|4store]"; -- cgit v1.2.3