diff options
| author | Daniel Micay <danielmicay@gmail.com> | 2019-04-25 17:58:53 -0400 |
|---|---|---|
| committer | Daniel Micay <danielmicay@gmail.com> | 2019-04-25 22:34:35 -0400 |
| commit | 1f78b34072693e94eb4e5ae0db1e8d7bc60807b2 (patch) | |
| tree | 0c4968e703d8da4ae6e8f3a4fbe4f5c4aed22252 /deploy_static | |
initial commit based on seamlessupdate.app
Diffstat (limited to 'deploy_static')
| -rwxr-xr-x | deploy_static | 17 |
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 |
