initial
This commit is contained in:
26
root/etc/service/cron/run
Normal file
26
root/etc/service/cron/run
Normal 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
|
||||
|
||||
Reference in New Issue
Block a user