summary refs log tree commit diff
path: root/os/etc/cron.daily/man-db
diff options
context:
space:
mode:
Diffstat (limited to 'os/etc/cron.daily/man-db')
-rwxr-xr-xos/etc/cron.daily/man-db11
1 files changed, 11 insertions, 0 deletions
diff --git a/os/etc/cron.daily/man-db b/os/etc/cron.daily/man-db
new file mode 100755
index 0000000..7f79323
--- /dev/null
+++ b/os/etc/cron.daily/man-db
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+# Use same perms/settings as the ebuild.
+cachedir="/var/cache/man"
+if [ ! -d "${cachedir}" ]; then
+	mkdir -p "${cachedir}"
+	chown man:man "${cachedir}"
+	chmod 0755 "${cachedir}"
+fi
+
+exec su man -s /bin/sh -c 'nice mandb --quiet' 2>/dev/null