Compare commits

..

No commits in common. "7fc3465d56f9b444360aafa1f50d7bdc990033d7" and "2d51e2001de2c0dc4e7222c7ce431e0af375bcdd" have entirely different histories.

2 changed files with 10 additions and 22 deletions

View File

@ -11,4 +11,4 @@ smtp_mynetworks:
- '[2605:6000:3ccd:da01::]/64'
- 172.30.0.240/28
- 172.31.1.0/24
- 172.30.0.160/27
- 172.30.0.160/28

View File

@ -1,31 +1,19 @@
#!/bin/sh
# vim: set sw=4 ts=4 sts=4 et :
QFILE="${HOME}"/createrepo.queue
REPOS_ROOT="${HOME}"/repos
wait_queue() {
inotifywait \
--event close_write \
--include "${QFILE##*/}" \
"${QFILE%/*}"
}
createrepo_loop() {
while wait_queue; do
while [ -f "${QFILE}" ]; do
sleep 10
flock "${QFILE}" mv "${QFILE}" "${QFILE}.work"
while sleep 30; do
[ -f "${QFILE}" ] || continue
mv "${QFILE}" "${QFILE}.work"
sort -u "${QFILE}.work" > "${QFILE}.sorted"
while read dir; do
if [ -d "${dir}" ]; then
printf 'Generating repository metadata for %s\n' "${dir}"
createrepo_c "${dir}"
fi
done < "${QFILE}.sorted"
rm -f "${QFILE}.work" "${QFILE}.sorted"
done
done
}
inotify_loop() {