Skip to content

Instantly share code, notes, and snippets.

@Roadmaster
Last active December 16, 2015 03:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Roadmaster/5367312 to your computer and use it in GitHub Desktop.
Save Roadmaster/5367312 to your computer and use it in GitHub Desktop.
# Tarmac lander
#
# This runs tarmac to automatically land launchpad branches on a periodic
# basis
description "Tarmac lander"
start on filesystem or runlevel [2345]
stop on runlevel [!2345]
task
respawn
setuid ubuntu
console log
env PYTHONPATH=/home/ubuntu/tarmac
env TARMAC_DIR=/home/ubuntu/tarmac
env TARMAC_CONFIG=/home/ubuntu/.config/tarmac/tarmac.conf
env SLEEP=1
pre-start script
[ -f $TARMAC_CONFIG ] || exit 1
echo "-- STARTING NEW MERGE RUN --"
end script
post-stop script
echo "-- SLEEPING $SLEEP MINUTES, SWEET DREAMS --"
sleep $(( 60 * $SLEEP ))
end script
exec $TARMAC_DIR/bin/tarmac merge -v -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment