Skip to content

Commit

Permalink
avoid syncing time for checksum-based rsync
Browse files Browse the repository at this point in the history
  • Loading branch information
thestinger committed Mar 3, 2024
1 parent 2a1d568 commit 20c2552
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions deploy-static
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ fi

. servers.sh

rsync -ptcv --chmod=F755 --fsync --preallocate certbot-replicate root@${servers[0]}:/usr/local/bin/
rsync -ptcv --chmod=F644 --fsync --preallocate replicate.conf root@${servers[0]}:/etc/systemd/system/certbot-renew.service.d/
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/

for server in ${servers[@]}; do
echo $server
Expand All @@ -33,11 +33,11 @@ for server in ${servers[@]}; do
echo

ssh $remote "rm -rf $target && cp -a $active $target"
rsync -rptcv --chmod=D755,F644 --delete --fsync --preallocate static-tmp/ $remote:$target
rsync -rpcv --chmod=D755,F644 --delete --fsync --preallocate static-tmp/ $remote:$target
ssh $remote "ln -snf $target /srv/releases.grapheneos.org && sync /srv/releases.grapheneos.org"

echo "root $target;" > nginx-tmp/root_releases.grapheneos.org.conf
rsync -rptcv --chmod=D755,F644 --delete --fsync --preallocate nginx-tmp/{nginx.conf,mime.types,root_releases.grapheneos.org.conf,snippets} $remote:/etc/nginx/
rsync -rpcv --chmod=D755,F644 --delete --fsync --preallocate nginx-tmp/{nginx.conf,mime.types,root_releases.grapheneos.org.conf,snippets} $remote:/etc/nginx/
ssh $remote nginx -s reload

echo
Expand Down

0 comments on commit 20c2552

Please sign in to comment.