1212
1313./process-static $fd
1414
15- remote=root@attestation.app
15+ remote=root@staging. attestation.app
1616
1717# use last modified timestamps from attestation.app
18- rsync -rptcv --chmod=D755,F644 --delete --fsync --preallocate $remote :/srv/attestation.app/ static-production
19- rsync -pcv --chmod=D755,F644 --fsync --preallocate static-production /sitemap.xml{,.gz,.br} static-tmp/
20- rsync -rpcv --chmod=D755,F644 --delete --fsync --preallocate static-tmp/ static-production
21- for f in static-production /** .* (br| gz); do
18+ rsync -rptcv --chmod=D755,F644 --delete --fsync --preallocate $remote :/srv/attestation.app/ static-staging
19+ rsync -pcv --chmod=D755,F644 --fsync --preallocate static-staging /sitemap.xml{,.gz,.br} static-tmp/
20+ rsync -rpcv --chmod=D755,F644 --delete --fsync --preallocate static-tmp/ static-staging
21+ for f in static-staging /** .* (br| gz); do
2222 touch -r " ${f% .* } " " $f "
2323done
2424changed=" $( ./generate-sitemap) "
2525xmllint --noblanks static-tmp/sitemap.xml --output static-tmp/sitemap.xml
2626brotli -f static-tmp/sitemap.xml
2727zopfli static-tmp/sitemap.xml
28- rsync -pcv --chmod=D755,F644 --fsync --preallocate static-tmp/sitemap.xml{,.gz,.br} static-production /
28+ rsync -pcv --chmod=D755,F644 --fsync --preallocate static-tmp/sitemap.xml{,.gz,.br} static-staging /
2929
3030active=$( ssh $remote readlink /srv/attestation.app)
3131
@@ -40,7 +40,7 @@ echo target is $target
4040echo
4141
4242ssh $remote " rm -rf $target && cp -a $active $target "
43- rsync -rpcv --chmod=D755,F644 --delete --fsync --preallocate static-production / $remote :$target
43+ rsync -rpcv --chmod=D755,F644 --delete --fsync --preallocate static-staging / $remote :$target
4444ssh $remote " ln -snf $target /srv/attestation.app && sync /srv/attestation.app"
4545
4646echo " root $target ;" > nginx-tmp/root_attestation.app.conf
@@ -55,8 +55,3 @@ ssh $remote 'id -u attestation &>/dev/null || useradd -r attestation -md /var/li
5555rsync -pcv --chmod=755 --fsync --preallocate remote-backup $remote :/usr/local/bin/
5656rsync -pcv --chmod=644 --fsync --preallocate systemd/system/remote-backup.timer $remote :/etc/systemd/system/remote-backup.timer
5757rsync -pcv --chmod=644 --fsync --preallocate systemd/system/remote-backup.service $remote :/etc/systemd/system/remote-backup.service
58- rsync -pcv --chmod=644 --chown attestation:attestation --fsync --preallocate backup-public-key.txt cloud-archive.sh $remote :/var/lib/attestation/
59-
60- if [[ -n " $changed " ]]; then
61- ./indexnow <<< " $changed"
62- fi
0 commit comments