Skip to content

Instantly share code, notes, and snippets.

@TomTasche
Last active October 9, 2016 09:57
Show Gist options
  • Save TomTasche/099697b3b2883748643ef160a413b50d to your computer and use it in GitHub Desktop.
Save TomTasche/099697b3b2883748643ef160a413b50d to your computer and use it in GitHub Desktop.
#!/bin/bash
logger "started"
sudo apt-get update --yes
sudo apt-get upgrade --yes
cd worker/
git clean -fdx
git checkout master
git pull --force origin master
mvn package
rm log.log
touch log.log
tail -f log.log | logger > /dev/null &
mvn exec:java > log.log 2>&1
logger "done"
cd ../
gcloud compute instances stop INSTANCE_NAME --zone "ZONE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment