use relative path for deployment

This commit is contained in:
Daniel Micay 2019-04-28 02:40:36 -04:00
parent b09989c22d
commit 19d2fc7200

View File

@ -3,7 +3,7 @@
set -o errexit
remote=www-data@grapheneos.org
current=$(ssh $remote readlink /var/www/html)
current=$(ssh $remote readlink html)
if [[ $current = html_a ]]; then
target=html_b
@ -11,7 +11,7 @@ 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
ssh $remote rm -rf $target
scp -r static $remote:$target
ssh $remote chmod -R a+rX $target
ssh $remote ln -snf $target html