ITADN

man-db: Configure a systemd .service to be triggered from the man-db trigger

#1451Closedermo 创建于 2026-02-20
area: plumbing
E
ermocommented
The man-db trigger is currently considered a tx trigger, which is quite literally nuts, because all `mandb` does is that it indexes man-pages under `/usr/share/man` and then creates `whatis` and `apropos` gdbm format files under `/var/cache/man/`. From `man mandb`: mandb is used to initialise or manually update index database caches. The caches contain information relevant to the current state of the manual page system and the information stored within them is used by the man‐db utilities to enhance their speed and functionality. Given that these caches are not critical for watching man pages via `man n foo`, it is thus reasonable to shove their creation off to a systemd-controlled service that refreshes the releated indices in the background. One way of efficiently doing this is to have the man-db trigger simply `touch` a file that is watched by a listening, systemd-controlled `man-db.service` (or `.socket` unit). Example: https://serverfault.com/questions/1175044/is-there-a-way-to-activate-a-service-unit-whenever-a-file-gets-updated
关闭于 2026-05-21 3 条评论