hakurei.app/deploy_static
2019-04-25 22:34:35 -04:00

18 lines
344 B
Bash
Executable File

#!/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