Commit b7358b4e authored by Holger Levsen's avatar Holger Levsen
Browse files

r.d.n: pkgsync script: refactoring

parent 709558c9
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
pkg sync unit
pkg sync timers
	run every 6h +- 30min, 2.5h after dinstall
	https://www.freedesktop.org/software/systemd/man/latest/systemd.timer.html#RandomizedDelaySec=
	+ a big AccuracySec=


rebuilderd backup
 unit or script which stops and disables the rebuilded service 
+6 −1
Original line number Diff line number Diff line
@@ -35,7 +35,12 @@ shift
# REBUILDERD_COOKIE_PATH could be set by service
export REBUILDERD_COOKIE_PATH=/srv/rebuilderd/$ARCH/.auth-cookie
while true ; do
	/opt/usr/bin/rebuildctl -H http://127.0.0.1:$PORT pkgs sync-profile --sync-config /opt/etc/rebuilderd-sync-${ARCH}.conf debian-main --print-json | jq "$JQQUERY" | jq -s | /opt/usr/bin/rebuildctl -H http://127.0.0.1:$PORT pkgs sync-stdin debian main
	/opt/usr/bin/rebuildctl -H http://127.0.0.1:$PORT pkgs sync-profile \
		--sync-config /opt/etc/rebuilderd-sync-${ARCH}.conf debian-main \
		--print-json \
		| jq "$JQQUERY" \
		| jq -s \
		| /opt/usr/bin/rebuildctl -H http://127.0.0.1:$PORT pkgs sync-stdin debian main
	ST=$(shuf -i 150-210 -n 1)
	echo sleeping ${ST}m now
	sleep ${ST}m