summaryrefslogtreecommitdiff
path: root/taler-build/switch_switch.sh
diff options
context:
space:
mode:
authorMarcello Stanisci <marcello.stanisci@inria.fr>2017-03-08 14:27:33 +0100
committerMarcello Stanisci <marcello.stanisci@inria.fr>2017-03-08 14:27:33 +0100
commite7f9de0a48c9d62146babe7f01bf397735b2d413 (patch)
tree18cc4d00d3b71477f65b83a49cd2bd6a9ac4c450 /taler-build/switch_switch.sh
parentdc9fab323fc836733b7cc998ee6141d7ecd19cc5 (diff)
downloaddeployment-e7f9de0a48c9d62146babe7f01bf397735b2d413.tar.gz
deployment-e7f9de0a48c9d62146babe7f01bf397735b2d413.tar.bz2
deployment-e7f9de0a48c9d62146babe7f01bf397735b2d413.zip
Adding stepts' scripts.
Diffstat (limited to 'taler-build/switch_switch.sh')
-rwxr-xr-xtaler-build/switch_switch.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/taler-build/switch_switch.sh b/taler-build/switch_switch.sh
new file mode 100755
index 0000000..e09b943
--- /dev/null
+++ b/taler-build/switch_switch.sh
@@ -0,0 +1,13 @@
+#!/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"
+sudo -u $nonactive bash -c 'cd $HOME; . activate; taler-deployment-restart'