Package: man-db
Version: 2.7.6.1-2

Dear Maintainer,
can you please add a systemd timer for the daily man-db cache regeneration.

--- /dev/null   2017-03-14 22:28:11.909999999 +0100
+++ man-db.timer        2017-03-16 12:07:22.956516872 +0100
@@ -0,0 +1,11 @@
+[Unit]
+Description=Daily man-db regeneration
+Documentation=man:mandb(8)
+
+[Timer]
+OnCalendar=daily
+AccuracySec=12h
+Persistent=true
+
+[Install]
+WantedBy=timers.target

--- /dev/null   2017-03-14 22:28:11.909999999 +0100
+++ man-db.service      2017-03-16 12:07:08.316606820 +0100
@@ -0,0 +1,13 @@
+[Unit]
+Description=Daily man-db regeneration
+Documentation=man:mandb(8)
+ConditionACPower=true
+
+[Service]
+Type=oneshot
+ExecStart=+/usr/bin/install -d -o man -g man -m 0755 /var/cache/man
+ExecStart=/usr/bin/mandb
+User=man
+Nice=19
+IOSchedulingClass=best-effort
+IOSchedulingPriority=7

--- /etc/cron.daily/man-db.old      2017-03-17 12:52:23.223042394 +0100
+++ /etc/cron.daily/man-db      2017-03-15 20:14:55.851223244 +0100
@@ -4,6 +4,10 @@

set -e

+# skip in favour of systemd timer
+if [ -d /run/systemd/system ]; then
+       exit 0
+fi
+
iosched_idle=
# Don't try to change I/O priority in a vserver or OpenVZ.
if ! egrep -q '(envID|VxID):.*[1-9]' /proc/self/status && \

--- /etc/cron.weekly/man-db.old      2017-03-17 12:53:18.442623547 +0100
+++ /etc/cron.weekly/man-db     2017-03-15 20:15:35.511005471 +0100
@@ -4,6 +4,10 @@

set -e

+# skip in favour of systemd timer
+if [ -d /run/systemd/system ]; then
+       exit 0
+fi
+
iosched_idle=
# Don't try to change I/O priority in a vserver or OpenVZ.
if ! egrep -q '(envID|VxID):.*[1-9]' /proc/self/status && \


This will run man-db without the --no-purge option daily.
But even on a raspberry pi this only takes 2,5s (vs 0,25s), which is
negligible as a daily job.

Best regards,
    Christian Göttsche

Reply via email to