diff --git a/openbis_all/source/bash/sprint_install.sh b/openbis_all/source/bash/sprint_install.sh index 816ebcaf2f1386506c71983091613aa8c1c2177f..889c6fd6b7338d1a872e73fc90b7686f24c308d0 100755 --- a/openbis_all/source/bash/sprint_install.sh +++ b/openbis_all/source/bash/sprint_install.sh @@ -47,6 +47,7 @@ echo Making a database dump... # restored with pg_restore, for example: # pg_restore -d dbname filename pg_dump -Uopenbis -Fc $DB_NAME > $DB_SNAPSHOT/$SERVERS_PREV_VER-$DB_NAMEi_${DATE}.dmp + # we actually need to clean that up from time to time /usr/bin/find $DB_SNAPSHOT -type f -mtime +$DAYS_TO_RETAIN -exec rm {} \; @@ -62,34 +63,29 @@ cd openBIS-server ./install.sh $PWD $CONFIG_DIR/service.properties $CONFIG_DIR/openbis.conf if [ -f $KEYSTORE ]; then cp -p $KEYSTORE jetty/etc/openBIS.keystore - sed 's/-Djavax.net.ssl.trustStore=openBIS.keystore //g' jetty/bin/openbis.conf > new-openbis.conf - mv -f new-openbis.conf jetty/bin/openbis.conf fi -cp ~openbis/old/$SERVERS_PREV_VER/openBIS-server/jetty/etc/jetty.xml ~openbis/$SERVERS_VER/openBIS-server/jetty/etc/jetty.xml -#jetty/bin/startup.sh echo Installing datastore server... cd .. unzip -q ../datastore_server-*$VER* -for file in ../datastore_server_plugin-*$VER*; do unzip -q -d datastore_server $file; done +if [ -f ../datastore_server_plugin-* ]; then + for file in ../datastore_server_plugin-*$VER*; do unzip -q -d datastore_server $file; done +fi cd datastore_server cp -p $CONFIG_DIR/datastore_server-service.properties etc/service.properties if [ -f $KEYSTORE ]; then cp -p $KEYSTORE etc/openBIS.keystore - #cp -Rf ~openbis/old/$SERVERS_PREV_VER/datastore_server/data/store/* data/store sed 's/-Djavax.net.ssl.trustStore=etc\/openBIS.keystore //g' datastore_server.sh > xxx mv -f xxx datastore_server.sh fi chmod 744 datastore_server.sh export JAVA_HOME=/usr -#./datastore_server.sh start -#echo Doing some cleaning... cd ~openbis mv -f *.zip old/ rm -rf openbis cd ~openbis/sprint/openBIS-server -rm jetty.zip install.sh openbis.conf openBIS.keystore openBIS.war passwd.sh jetty.xml service.properties jetty-version.txt +rm jetty.zip install.sh openbis.conf openBIS.keystore openBIS.war passwd.sh jetty.xml service.properties jetty-version.txt setup-env web-client.properties shutdown.sh startup.sh # Reset the rm command alias alias 'rm=rm -i' @@ -98,4 +94,4 @@ alias 'cp=cp -ipR' echo Running ~openbis/bin/sprint_post_install.sh ~openbis/bin/sprint_post_install.sh -echo "Done, now start the servers using all-up.sh" \ No newline at end of file +echo "Done, now start the servers using all-up.sh" diff --git a/openbis_all/source/bash/sprint_post_install.sh b/openbis_all/source/bash/sprint_post_install.sh index f41b2919b93b6bd6b55dcd29b9608127e41df05d..1759aaddfb852fba6e57e3bdd347901dfc8d10cc 100755 --- a/openbis_all/source/bash/sprint_post_install.sh +++ b/openbis_all/source/bash/sprint_post_install.sh @@ -10,7 +10,7 @@ export YEASTX=obis.ethz.ch export PHOSPHONETX=openbis-phosphonetx.ethz.ch export LIVERX=openbis-liverx.ethz.ch export AGRONOMICS=bs-agronomics01.ethz.ch -export DSU=openbis-dsu +export DSU=bs-openbis04.ethz.ch export SCU=openbis-scu export BASYSBIO=bs-basysbio01.ethz.ch export BASYSBIO_TEST=openbis-test @@ -21,18 +21,22 @@ export LIMB=bs-openbis03.ethz.ch function create_individual_greeting_message { # Creates an individual greeting message if [ -f ~openbis/config/openbis_instance.txt ]; then - export OPENBIS_DICT=~openbis/sprint/openBIS-server/jetty/webapps/openbis/common-dictionary.js + export OPENBIS_DICT=~openbis/sprint/openBIS-server/jetty/webapps/openbis/config_files-dictionary.js export SERVER_INSTANCE_NAME=`cat ~openbis/config/openbis_instance.txt` perl -pe 's/openbis_instance: "",/openbis_instance: "$ENV{SERVER_INSTANCE_NAME}",/' -i $OPENBIS_DICT fi } -function restore_common { +function restore_config_files { + echo restoring config files... + if [ -d ~openbis/config/images ]; then + cp -r ~openbis/config/images ~openbis/sprint/openBIS-server/jetty/webapps/openbis/ + fi if [ -f ~openbis/config/loginHeader.html ]; then - echo restoring loginHeader.html, etc... - cp -r ~openbis/config/images ~openbis/sprint/openBIS-server/jetty/webapps/openbis/ - cp ~openbis/config/loginHeader.html ~openbis/sprint/openBIS-server/jetty/webapps/openbis/ - cp ~openbis/config/help.html ~openbis/sprint/openBIS-server/jetty/webapps/openbis/ + cp ~openbis/config/loginHeader.html ~openbis/sprint/openBIS-server/jetty/webapps/openbis/ + fi + if [ -f ~openbis/config/help.html ]; then + cp ~openbis/config/help.html ~openbis/sprint/openBIS-server/jetty/webapps/openbis/ fi if [ -f ~openbis/config/index.html ]; then cp ~openbis/config/index.html ~openbis/sprint/openBIS-server/jetty/webapps/openbis/ @@ -49,10 +53,13 @@ function restore_common { if [ -f ~openbis/config/welcomePageSimple.html ]; then cp ~openbis/config/welcomePageSimple.html ~openbis/sprint/openBIS-server/jetty/webapps/openbis/ fi + if [ -f ~openbis/config/datastore_server.conf ]; then + cp ~openbis/config/datastore_server.conf ~openbis/sprint/datastore_server/etc/ + fi } function add_yeastx_plugin { - echo copying yeastx... + echo installing yeastx... cd ~openbis/config unzip ~openbis/config/datastore_server_plugin*.zip mv -f ~openbis/config/lib/datastore_server-plugins.jar ~openbis/sprint/datastore_server/lib @@ -64,81 +71,81 @@ case "$SERVER" in $SPRINT) echo SPRINT:$SPRINT; - restore_common + restore_config_files create_individual_greeting_message $BIN/sprint_post_install_sprint.sh ;; $DEMO) - restore_common + restore_config_files create_individual_greeting_message echo DEMO:$DEMO; $BIN/sprint_post_install_demo.sh ;; $YEASTX) - restore_common + restore_config_files create_individual_greeting_message echo YEASTX:$YEASTX; $BIN/sprint_post_install_yeastx.sh ;; $PHOSPHONETX) - restore_common + restore_config_files create_individual_greeting_message $BIN/sprint_post_install_phosphonetx.sh echo PHOSPHONETX:$PHOSPHONETX; ;; $LIVERX) - restore_common + restore_config_files create_individual_greeting_message echo LIVERX:$LIVERX; ;; $AGRONOMICS) echo AGRONOMICS:$AGRONOMICS; - restore_common + restore_config_files create_individual_greeting_message add_yeastx_plugin $BIN/sprint_post_install_agronomics.sh ;; $DSU) echo DSU:$DSU; - restore_common + restore_config_files create_individual_greeting_message DSU_SERVER_HOME=~openbis/sprint/openBIS-server/jetty/webapps/openbis cp ~openbis/config/openBIS_for_DSU.pdf $DSU_SERVER_HOME ;; $SCU) echo SCU:$SCU; - restore_common + restore_config_files create_individual_greeting_message ;; $BASYSBIO) echo BASYSBIO:$BASYSBIO; - restore_common + restore_config_files create_individual_greeting_message add_yeastx_plugin $BIN/sprint_post_install_basysbio.sh ;; $BASYSBIO_TEST) echo BASYSBIO_TEST:$BASYSBIO_TEST; - restore_common + restore_config_files create_individual_greeting_message add_yeastx_plugin $BIN/sprint_post_install_basysbio.sh ;; $CINA) echo CINA:$CINA; - restore_common + restore_config_files create_individual_greeting_message ;; $PLASMIDS) echo PLASMIDS:$PLASMIDS; - restore_common + restore_config_files create_individual_greeting_message $BIN/sprint_post_install_plasmids.sh ;; $LIMB) echo LIMB:$LIMB; - restore_common + restore_config_files create_individual_greeting_message ;; *)