This commit is contained in:
2020-04-11 10:53:41 -07:00
parent 60a34d2505
commit f023a86dea
8 changed files with 221 additions and 0 deletions

26
root/etc/service/cron/run Normal file
View File

@@ -0,0 +1,26 @@
#!/bin/bash
# mostly cribbed from
# https://github.com/phusion/baseimage-docker/tree/master/image/services/cron
chmod 600 /etc/crontab
# https://github.com/phusion/baseimage-docker/issues/345
#sed -i 's/^\s*session\s\+required\s\+pam_loginuid.so/# &/' /etc/pam.d/cron
## Remove useless cron entries.
# Checks for lost+found and scans for mtab.
rm -f /etc/cron.daily/standard
rm -f /etc/cron.daily/upstart
rm -f /etc/cron.daily/dpkg
rm -f /etc/cron.daily/password
rm -f /etc/cron.weekly/fstrim
# Touch cron files to fix 'NUMBER OF HARD LINKS > 1' issue. See
# https://github.com/phusion/baseimage-docker/issues/198
touch -c /var/spool/cron/crontabs/*
touch -c /etc/crontab
touch -c /etc/cron.d/* /etc/cron.daily/* /etc/cron.hourly/*
/etc/cron.monthly/* /etc/cron.weekly/*
exec /usr/sbin/cron -f