Skip to content

Instantly share code, notes, and snippets.

@kennethgillen
Created December 15, 2017 10:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kennethgillen/648475c91f3fa4cf6f572897c040078c to your computer and use it in GitHub Desktop.
Save kennethgillen/648475c91f3fa4cf6f572897c040078c to your computer and use it in GitHub Desktop.
# Owned, and run by, the OMERO-server O.S. user
# Executed like ./upgrade-server.sh new-omero-version-dist.tar.gz
set -e
set -u
set -x
DIR=$1
# Your command to check status and stop OMERO.server
OMERO.server/bin/omero admin status --nodeonly && OMERO.server/bin/omero admin stop
# Copy the current OMERO config file
cp OMERO.server/etc/grid/config.xml $HOME/
# Copy the current mail-sending config file
cp OMERO.server/etc/blitz/mail-senders.xml $HOME/
# OMERO.server is a symlink
rm -f OMERO.server
ln -s $DIR OMERO.server
cd OMERO.server
# Prep the OMERO-dist with our current OMERO config file
cp $HOME/config.xml etc/grid/
# Prep the OMERO-dist with our current mail-sending config file
cp $HOME/mail-senders.xml etc/blitz/
# OMERO startup
bin/omero admin start
# Re-upload the OMERO.figure PDF-generation script
echo "Don't forget to upload the OMERO.figure PDF-generation script"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment