summaryrefslogtreecommitdiff
path: root/deploy_static
blob: 03d290715c7c770d37126305ab5f70f020f57a7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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