From 2a9154ab9115f86d5824e5424d164c98624a6545 Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Tue, 17 May 2011 01:19:19 -0700 Subject: Supporting release branch for backlinking --- opentox-ruby.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100755 => 100644 opentox-ruby.sh diff --git a/opentox-ruby.sh b/opentox-ruby.sh old mode 100755 new mode 100644 index 5fcff1c..08c37ef --- a/opentox-ruby.sh +++ b/opentox-ruby.sh @@ -70,7 +70,7 @@ mkdir -p "$HOME/.opentox/log" >>$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" -if [ "$OT_BRANCH" = "development" ]; then +if [ "$OT_BRANCH" = "development" ] || expr match "$OT_BRANCH" "release"; then mkdir -p $WWW_DEST/opentox >>$LOG 2>&1 cd $WWW_DEST/opentox >>$LOG 2>&1 rm -rf opentox-ruby >>$LOG 2>&1 -- cgit v1.2.3 From 7b6f2234bd52d129e1f29bd60a2e1e2b2bd8be88 Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Wed, 18 May 2011 09:21:44 +0200 Subject: Fixed checkout development as git@..., root check at beginning of install --- install | 11 ++++++++--- opentox-webservices.sh | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/install b/install index ce76e87..daa7d57 100755 --- a/install +++ b/install @@ -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 @@ -18,9 +23,9 @@ 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." 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 -- cgit v1.2.3 From 197f021a1beb04f1fd07ef8ae7d90440f693a01d Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Wed, 18 May 2011 09:22:33 +0200 Subject: Cleaning temp files at the beginning --- install | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install b/install index daa7d57..101f1ba 100755 --- a/install +++ b/install @@ -15,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 temp files." +sudo rm -rf /tmp/openbabel* /tmp/kernlab* /tmp/ruby* /tmp/passenger* + . "./base-install.sh" . "./ruby.sh" . "./openbabel.sh" -- cgit v1.2.3 From 12e9b288603f389dbc50e8fadb4e6c35ec1223dc Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Wed, 18 May 2011 09:25:24 +0200 Subject: Moved temp file cleaning to start --- install | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/install b/install index 101f1ba..6a1e84f 100755 --- a/install +++ b/install @@ -15,7 +15,7 @@ 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 temp files." +echo "Cleaning up /tmp files." sudo rm -rf /tmp/openbabel* /tmp/kernlab* /tmp/ruby* /tmp/passenger* . "./base-install.sh" @@ -31,9 +31,6 @@ then . "./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'" -- cgit v1.2.3 From 7d7ed42d8700c4980c767d2904cd6696cd80a3b2 Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Wed, 18 May 2011 09:29:09 +0200 Subject: Checking out production.yaml as template --- opentox-ruby.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/opentox-ruby.sh b/opentox-ruby.sh index 5fcff1c..adccf4d 100755 --- 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" -- cgit v1.2.3