Move where umask is used.

This commit is contained in:
Darren 'Tadgy' Austin 2026-05-23 23:51:18 +01:00
commit 578eb90e69

View file

@ -26,6 +26,9 @@ notify() {
return 0
}
# Logs are only for root.
umask 027
# Only run for the configured mirroring user.
[[ "$(whoami)" != "$MIRRORING_USER" ]] && {
printf "%s: %s\\n" "${0##*/}" "must be run by the '$MIRRORING_USER' user - use su to run manually" >&2
@ -60,9 +63,6 @@ if [[ "$FLOCK" != "$0" ]]; then
fi
fi
# Logs are only for root.
umask 027
# Drop the caches as sometimes old user/groups are cached.
sudo /opt/sbin/drop-caches