mirror of
https://codeberg.org/privacy1st/nix-git
synced 2025-03-18 13:29:30 +01:00
daily backup: wait until nix-gc has finished
This commit is contained in:
parent
c3925cc33f
commit
24afb85194
@ -127,6 +127,16 @@ in
|
||||
sleep 60s
|
||||
done
|
||||
|
||||
# Wait until no nix garbage collection service is running.
|
||||
while :; do
|
||||
running_services="$(systemctl list-units --type=service --plain --quiet | awk '{ print $1 }')"
|
||||
if ! printf '%s' "''${running_services}" | grep '^nix-gc.service$'; then
|
||||
break;
|
||||
fi
|
||||
printf '%s\n' 'Delaying suspend due to running nix garbage collection service.'
|
||||
sleep 60s
|
||||
done
|
||||
|
||||
# Send filtered journal by email.
|
||||
systemctl start journalwatch.service ||:
|
||||
# Send notification by email.
|
||||
|
Loading…
x
Reference in New Issue
Block a user