summaryrefslogtreecommitdiff
path: root/buildbot/sign.sh
blob: cc93052abb23749ff977ac17740e949862ab609b (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-config-sign'