#!/bin/sh name=$1 . "$HOME/$name.params" echo Starting $CONTAINER_NAME lxc-start -n "$CONTAINER_NAME" if [ $? -ne 0 ]; then exit $? fi sleep 10 echo Starting build by $BUILD_USER in $CONTAINER_NAME lxc-attach -n "$CONTAINER_NAME" -- /home/$BUILD_USER/blastem/build_nightly $BUILD_USER needsu 2>&1 > /tmp/build_${name}_out.log result=$? if [ $result -ne 0 ]; then echo Build falied with return code $result stopping $CONTAINER_NAME lxc-stop -n "$CONTAINER_NAME" curdate=`date -Iseconds` curl -d'@-' -H 'Content-Type: application/json' "$WEBHOOKURL" <