improve deployment script output
This commit is contained in:
parent
9b792f976d
commit
a591521ff1
@ -1,16 +1,20 @@
|
|||||||
#!/bin/bash -x
|
#!/bin/bash
|
||||||
|
|
||||||
set -o errexit
|
set -o errexit
|
||||||
|
|
||||||
remote=www-data@grapheneos.org
|
remote=www-data@grapheneos.org
|
||||||
current=$(ssh $remote readlink html)
|
active=$(ssh $remote readlink html)
|
||||||
|
|
||||||
if [[ $current = html_a ]]; then
|
if [[ $active = html_a ]]; then
|
||||||
target=html_b
|
target=html_b
|
||||||
else
|
else
|
||||||
target=html_a
|
target=html_a
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo active is $active
|
||||||
|
echo target is $target
|
||||||
|
echo
|
||||||
|
|
||||||
rsync -rcve ssh --delete static/ $remote:$target
|
rsync -rcve ssh --delete static/ $remote:$target
|
||||||
ssh $remote chmod -R a+rX $target
|
ssh $remote chmod -R a+rX $target
|
||||||
ssh $remote ln -snf $target html
|
ssh $remote ln -snf $target html
|
||||||
|
Loading…
x
Reference in New Issue
Block a user