rename static-deploy

This commit is contained in:
Daniel Micay 2024-03-08 23:59:13 -05:00
parent 8b8ce937f6
commit 15318cab02
2 changed files with 5 additions and 5 deletions

2
.gitignore vendored
View File

@ -4,6 +4,6 @@
/cloud-archive-password.txt
/lock
/nginx-tmp/
/static-deploy/
/static-production/
/static-tmp/
/venv/

View File

@ -16,9 +16,9 @@ fi
remote=root@matrix.grapheneos.org
# use last modified timestamps from matrix.grapheneos.org
rsync -rptcv --chmod=D755,F644 --delete --fsync --preallocate $remote:/srv/element.grapheneos.org/ static-deploy
rsync -rpcv --chmod=D755,F644 --delete --fsync --preallocate static-tmp/ static-deploy
for f in static-deploy/**.*(br|gz); do
rsync -rptcv --chmod=D755,F644 --delete --fsync --preallocate $remote:/srv/element.grapheneos.org/ static-production
rsync -rpcv --chmod=D755,F644 --delete --fsync --preallocate static-tmp/ static-production
for f in static-production/**.*(br|gz); do
touch -r "${f%.*}" "$f"
done
@ -35,7 +35,7 @@ echo target is $target
echo
ssh $remote "rm -rf $target && cp -a $active $target"
rsync -rpcv --chmod=D755,F644 --delete --fsync --preallocate static-deploy/ $remote:$target
rsync -rpcv --chmod=D755,F644 --delete --fsync --preallocate static-production/ $remote:$target
ssh $remote "ln -snf $target /srv/element.grapheneos.org && sync /srv/element.grapheneos.org"
echo "root $target;" > nginx-tmp/root_element.grapheneos.org.conf