diff options
author | Andreas Maunz <andreas@maunz.de> | 2011-05-18 09:29:53 +0200 |
---|---|---|
committer | Andreas Maunz <andreas@maunz.de> | 2011-05-18 09:29:53 +0200 |
commit | ccdba9f5223d82873b1c653ea3f8635f18fefd0e (patch) | |
tree | a65f1c14b32e36be889f5724be82bfb9c103d684 | |
parent | a198d10ba86c08d84d707704654cf206c42fb040 (diff) | |
parent | 6ea88d31eeae8017d13b495f97794243838a2e42 (diff) |
Merge branch 'development' into release/2.0.0
-rwxr-xr-x | install | 17 | ||||
-rw-r--r-- | opentox-ruby.sh | 3 | ||||
-rwxr-xr-x | opentox-webservices.sh | 2 |
3 files changed, 15 insertions, 7 deletions
@@ -2,6 +2,11 @@ # Main Opentox-ruby install script # Author: Christoph Helma, Andreas Maunz +if [ "$(id -u)" = "0" ]; then + echo "This script must not be run as root" 1>&2 + exit 1 +fi + LOG="/tmp/`basename $0`-log.txt" . "./utils.sh" echo @@ -10,6 +15,9 @@ echo "You may need to give root password for some privileged actions right now a echo cmd="sudo echo -n \"\"" && run_cmd "$cmd" "Acquire privileges" +echo "Cleaning up /tmp files." +sudo rm -rf /tmp/openbabel* /tmp/kernlab* /tmp/ruby* /tmp/passenger* + . "./base-install.sh" . "./ruby.sh" . "./openbabel.sh" @@ -18,14 +26,11 @@ cmd="sudo echo -n \"\"" && run_cmd "$cmd" "Acquire privileges" if [ "$install" != "gem" ] then - . "./nginx.sh" - . "./redis.sh" - . "./opentox-webservices.sh" + . "./nginx.sh" + . "./redis.sh" + . "./opentox-webservices.sh" fi -echo "Cleaning up temp files." -sudo rm -rf /tmp/openbabel* /tmp/kernlab* /tmp/ruby* /tmp/passenger* - echo echo "Installation finished and system configured." echo "Destination: '$OT_PREFIX'" diff --git a/opentox-ruby.sh b/opentox-ruby.sh index 08c37ef..5f8cc65 100644 --- a/opentox-ruby.sh +++ b/opentox-ruby.sh @@ -67,6 +67,9 @@ fi mkdir -p "$HOME/.opentox/config" >>$LOG 2>&1 mkdir -p "$HOME/.opentox/log" >>$LOG 2>&1 +$GIT checkout production.yaml >>$LOG 2>&1 +$GIT checkout aa-$OT_INSTALL.yaml >>$LOG 2>&1 + cmd="sed -e \"s,SERVERNAME,$servername,;s,ESCAPEDSERVER,$escapedserver,;s,LOGGER,$logger,;s,AA,$aa,;s,WWW_DEST,$WWW_DEST,\" production.yaml > $HOME/.opentox/config/production.yaml" && run_cmd "$cmd" "Config 1" cmd="sed -e \"s,SERVERNAME,$servername,;s,ESCAPEDSERVER,$escapedserver,;s,LOGGER,$logger,;s,AA,$aa,;s,WWW_DEST,$WWW_DEST,\" aa-$OT_INSTALL.yaml >> $HOME/.opentox/config/production.yaml" && run_cmd "$cmd" "Config 1" diff --git a/opentox-webservices.sh b/opentox-webservices.sh index 23af311..91d402e 100755 --- a/opentox-webservices.sh +++ b/opentox-webservices.sh @@ -44,7 +44,7 @@ mkdir -p "$WWW_DEST/opentox" >>$LOG 2>&1 cd "$WWW_DEST/opentox" >>$LOG 2>&1 for s in compound dataset algorithm model toxcreate task validation; do rm -rf "$s" >>$LOG 2>&1 - $GIT clone "git://github.com/opentox/$s.git" "$s" >>$LOG 2>&1 + $GIT clone "git@github.com:opentox/$s.git" "$s" >>$LOG 2>&1 cd "$s" >>$LOG 2>&1 $GIT checkout -b $OT_BRANCH origin/$OT_BRANCH >>$LOG 2>&1 #rm -rf public >>$LOG 2>&1 |