summaryrefslogtreecommitdiff
path: root/buildbot/keys.sh
blob: 220492f21e32f43e6a4fccf28a7eac41f52a4fe7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

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 = "${DEPLOYMENT}-blue"; then
  nonactive="${DEPLOYMENT}-green"
fi

sudo -u $nonactive bash -c 'source $HOME/activate; taler-deployment-keyup'