mirror of
https://github.com/GrapheneOS/infrastructure.git
synced 2025-11-26 09:36:18 -05:00
This closes a small window where new workers could give keys not accepted by the old workers before they're gracefully shut down. This will also be needed when syncing keys across a cluster.
27 lines
510 B
Bash
Executable file
27 lines
510 B
Bash
Executable file
#!/bin/bash
|
|
|
|
set -o errexit -o nounset -o pipefail
|
|
|
|
cd /etc/session-ticket-keys
|
|
|
|
rsync -tI 2.key 1.key
|
|
rsync -tI 3.key 2.key
|
|
rsync -tI 4.key 3.key
|
|
rsync -tI next.key 4.key
|
|
head -c 80 </dev/random >tmp.key
|
|
mv tmp.key next.key
|
|
|
|
cat next.key {1..4}.key > keys.new
|
|
mv keys.new keys
|
|
|
|
status=0
|
|
|
|
if systemctl is-enabled nginx.service >/dev/null; then
|
|
nginx -s reload || status=1
|
|
fi
|
|
|
|
if systemctl is-enabled dnsdist.service >/dev/null; then
|
|
dnsdist -c -e 'reloadAllCertificates()' || status=1
|
|
fi
|
|
|
|
exit $status
|