summaryrefslogtreecommitdiff
path: root/buildbot/switch.sh
blob: a7bfaf01cbbc3aa04f8941f73e0864cec2d67c52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash

active=$(sudo -u test cat /home/test/active)
nonactive="test-blue"
echo "Active party: ${active}"

if test $active = "test-blue"; then
  nonactive="test-green"
fi

echo "Switching to ${nonactive}."
sudo -u test bash -c "cd /home/test; ./ln-${nonactive}.sh"