Skip to content

Instantly share code, notes, and snippets.

@a2f0
Created December 6, 2016 22: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 a2f0/d91abb7105a8ca1dfb0abb3de5994db1 to your computer and use it in GitHub Desktop.
Save a2f0/d91abb7105a8ca1dfb0abb3de5994db1 to your computer and use it in GitHub Desktop.
#!/bin/sh
#THIS REQUIRES THE FOLLOWING LINE TO BE CONFIGURED IN /etc/sudoers
#some.account.name ALL = NOPASSWD: /sbin/service crond *
if [ `whoami` == some.account.name ]; then
export GALAXY_RUN_ALL=1
sudo /sbin/service crond stop
while pgrep galaxy-dropbox > /dev/null; do sleep 1 && echo "waiting for galaxy-dropbox to finish"; done
/group/galaxy/galaxy-dist/run.sh --stop-daemon && sleep 15
cd /group/galaxy/galaxy-dist; sh run.sh --daemon --log-file /group/galaxy/log/galaxy.log
while ! echo exit | nc localhost 8080; do sleep 1 && echo "waiting for galaxy to start"; done
echo "To watch Galaxy start Type:"
echo "tail -f /group/galaxy/log/galaxy.log"
sudo /sbin/service crond start
else
echo "Please run this as the galaxy user."
fi;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment