summaryrefslogtreecommitdiff
path: root/buildbot/restart.sh
diff options
context:
space:
mode:
Diffstat (limited to 'buildbot/restart.sh')
-rwxr-xr-xbuildbot/restart.sh13
1 files changed, 9 insertions, 4 deletions
diff --git a/buildbot/restart.sh b/buildbot/restart.sh
index dad6366..19a18d1 100755
--- a/buildbot/restart.sh
+++ b/buildbot/restart.sh
@@ -1,11 +1,16 @@
#!/bin/bash
-active=$(sudo -u test cat /home/test/active)
-nonactive="test-blue"
+DEPLOYMENT="test"
+
+if test "stable" = ${BRANCH}; then
+ DEPLOYMENT="demo"
+
+active=$(sudo -u ${DEPLOYMENT} cat /home/${DEPLOYMENT}/active)
+nonactive="${DEPLOYMENT}-blue"
echo "Active party: ${active}"
-if test $active = "test-blue"; then
- nonactive="test-green"
+if test $active = "${DEPLOYMENT}-blue"; then
+ nonactive="${DEPLOYMENT}-green"
fi
sudo -u $nonactive bash -c 'cd $HOME; . activate; taler-deployment-restart'