consistent last modified timestamps across mirrors

This commit is contained in:
Daniel Micay 2024-03-04 12:07:16 -05:00
parent 8af61b5d9c
commit 9300b2b894
2 changed files with 6 additions and 1 deletions

1
.gitignore vendored
View File

@ -2,5 +2,6 @@
/nginx-tmp/ /nginx-tmp/
/node_modules/ /node_modules/
/releases-base /releases-base
/static-deploy/
/static-tmp/ /static-tmp/
/venv/ /venv/

View File

@ -16,6 +16,10 @@ servers=({0..3}.grapheneos.org)
rsync -pcv --chmod=F755 --fsync --preallocate certbot-replicate root@${servers[0]}:/usr/local/bin/ rsync -pcv --chmod=F755 --fsync --preallocate certbot-replicate root@${servers[0]}:/usr/local/bin/
rsync -pcv --chmod=F644 --fsync --preallocate replicate.conf root@${servers[0]}:/etc/systemd/system/certbot-renew.service.d/ rsync -pcv --chmod=F644 --fsync --preallocate replicate.conf root@${servers[0]}:/etc/systemd/system/certbot-renew.service.d/
# use last modified timestamps from 0.grapheneos.org
rsync -rptcv --chmod=D755,F644 --delete --fsync --preallocate root@${servers[0]}:/srv/grapheneos.org/ static-deploy
rsync -rpcv --chmod=D755,F644 --delete --fsync --preallocate static-tmp/ static-deploy
for server in ${servers[@]}; do for server in ${servers[@]}; do
echo $server echo $server
@ -33,7 +37,7 @@ for server in ${servers[@]}; do
echo echo
ssh $remote "rm -rf $target && cp -a $active $target" ssh $remote "rm -rf $target && cp -a $active $target"
rsync -rpcv --chmod=D755,F644 --delete --fsync --preallocate static-tmp/ $remote:$target rsync -rptcv --chmod=D755,F644 --delete --fsync --preallocate static-deploy/ $remote:$target
ssh $remote "ln -snf $target /srv/grapheneos.org && sync /srv/grapheneos.org" ssh $remote "ln -snf $target /srv/grapheneos.org && sync /srv/grapheneos.org"
echo "root $target;" > nginx-tmp/root_grapheneos.org.conf echo "root $target;" > nginx-tmp/root_grapheneos.org.conf