summaryrefslogtreecommitdiff
path: root/taler-build
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
parentdc9fab323fc836733b7cc998ee6141d7ecd19cc5 (diff)
downloaddeployment-e7f9de0a48c9d62146babe7f01bf397735b2d413.tar.gz
deployment-e7f9de0a48c9d62146babe7f01bf397735b2d413.tar.bz2
deployment-e7f9de0a48c9d62146babe7f01bf397735b2d413.zip
Adding stepts' scripts.
Diffstat (limited to 'taler-build')
-rwxr-xr-xtaler-build/switch_build.sh11
-rwxr-xr-xtaler-build/switch_check_exchange.sh11
-rwxr-xr-xtaler-build/switch_check_merchant.sh16
-rwxr-xr-xtaler-build/switch_restart.sh7
-rwxr-xr-xtaler-build/switch_switch.sh13
5 files changed, 58 insertions, 0 deletions
diff --git a/taler-build/switch_build.sh b/taler-build/switch_build.sh
new file mode 100755
index 0000000..f04240f
--- /dev/null
+++ b/taler-build/switch_build.sh
@@ -0,0 +1,11 @@
+#!/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
+
+sudo -u $nonactive bash -c 'source $HOME/activate; taler-deployment-build'
diff --git a/taler-build/switch_check_exchange.sh b/taler-build/switch_check_exchange.sh
new file mode 100755
index 0000000..fdf1b5b
--- /dev/null
+++ b/taler-build/switch_check_exchange.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+status_code1=$(curl -s -o /dev/null -w "%{http_code}" https://exchange.test.taler.net/)
+status_code2=$(curl -s -o /dev/null -w "%{http_code}" https://exchange.test.taler.net/keys)
+
+if test \
+ $status_code1 = 502 -o \
+ $status_code2 = 502; then
+ exit 1
+fi
+exit 0
diff --git a/taler-build/switch_check_merchant.sh b/taler-build/switch_check_merchant.sh
new file mode 100755
index 0000000..0561b03
--- /dev/null
+++ b/taler-build/switch_check_merchant.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+status_code1=$(curl -s -o /dev/null -w "%{http_code}" https://shop.test.taler.net/backend)
+status_code2=$(curl -s -o /dev/null -w "%{http_code}" https://shop.test.taler.net/backend/proposal)
+status_code3=$(curl -s -o /dev/null -w "%{http_code}" https://donations.test.taler.net/backend)
+status_code4=$(curl -s -o /dev/null -w "%{http_code}" https://donations.test.taler.net/backend/proposal)
+
+if test \
+ $status_code1 = 502 -o \
+ $status_code2 = 502 -o \
+ $status_code3 = 502 -o \
+ $status_code4 = 502; then
+ exit 1
+fi
+
+exit 0
diff --git a/taler-build/switch_restart.sh b/taler-build/switch_restart.sh
new file mode 100755
index 0000000..425300b
--- /dev/null
+++ b/taler-build/switch_restart.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+active=$(sudo -u test cat /home/test/active)
+nonactive="test-blue"
+echo "Active party: ${active}"
+
+sudo -u $nonactive bash -c 'cd $HOME; . activate; taler-deployment-restart'
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'