1414
1515. servers.sh
1616
17- remote=root@nyc .grapheneos.org
17+ remote=root@staging .grapheneos.org
1818
19- rsync -pcv --chmod=F644 --fsync --preallocate mirrors $remote :/etc/mirrors
20-
21- # use last modified timestamps from nyc.grapheneos.org
22- rsync -rptcv --chmod=D755,F644 --delete --fsync --preallocate $remote :/srv/grapheneos.org/ static-production
23- rsync -pcv --chmod=D755,F644 --fsync --preallocate static-production/sitemap.xml{,.gz,.br} static-tmp/
24- rsync -rpcv --chmod=D755,F644 --delete --fsync --preallocate static-tmp/ static-production
25- for f in static-production/** .* (br| gz); do
19+ # use last modified timestamps from staging.grapheneos.org
20+ rsync -rptcv --chmod=D755,F644 --delete --fsync --preallocate $remote :/srv/grapheneos.org/ static-staging
21+ rsync -pcv --chmod=D755,F644 --fsync --preallocate static-staging/sitemap.xml{,.gz,.br} static-tmp/
22+ rsync -rpcv --chmod=D755,F644 --delete --fsync --preallocate static-tmp/ static-staging
23+ for f in static-staging/** .* (br| gz); do
2624 touch -r " ${f% .* } " " $f "
2725done
2826changed=" $( ./generate-sitemap) "
2927xmllint --noblanks static-tmp/sitemap.xml --output static-tmp/sitemap.xml
3028brotli -f static-tmp/sitemap.xml
3129zopfli static-tmp/sitemap.xml
32- rsync -pcv --chmod=D755,F644 --fsync --preallocate static-tmp/sitemap.xml{,.gz,.br} static-production /
30+ rsync -pcv --chmod=D755,F644 --fsync --preallocate static-tmp/sitemap.xml{,.gz,.br} static-staging /
3331
3432for server in ${servers[@]} ; do
3533 echo $server
@@ -48,7 +46,7 @@ for server in ${servers[@]}; do
4846 echo
4947
5048 ssh $remote " rm -rf $target && cp -a $active $target "
51- rsync -rptcv --chmod=D755,F644 --delete --fsync --preallocate static-production / $remote :$target
49+ rsync -rptcv --chmod=D755,F644 --delete --fsync --preallocate static-staging / $remote :$target
5250 ssh $remote " ln -snf $target /srv/grapheneos.org && sync /srv/grapheneos.org"
5351
5452 echo " root $target ;" > nginx-tmp/root_grapheneos.org.conf
@@ -59,7 +57,3 @@ for server in ${servers[@]}; do
5957 echo active is now $target
6058 echo
6159done
62-
63- if [[ -n " $changed " ]]; then
64- ./indexnow <<< " $changed"
65- fi
0 commit comments