summaryrefslogtreecommitdiff
path: root/deploy_static
diff options
context:
space:
mode:
Diffstat (limited to 'deploy_static')
-rwxr-xr-xdeploy_static17
1 files changed, 17 insertions, 0 deletions
diff --git a/deploy_static b/deploy_static
new file mode 100755
index 00000000..03d29071
--- /dev/null
+++ b/deploy_static
@@ -0,0 +1,17 @@
+#!/bin/bash -x
+
+set -o errexit
+
+remote=root@grapheneos.org
+current=$(ssh $remote readlink /var/www/html)
+
+if [[ $current = html_a ]]; then
+ target=html_b
+else
+ target=html_a
+fi
+
+ssh $remote rm -rf /var/www/$target
+scp -r static $remote:/var/www/$target
+ssh $remote chmod -R a+rX /var/www/$target
+ssh $remote ln -snf $target /var/www/html