2020-10-26 15:16:12 +00:00
|
|
|
#!bin/sh
|
2019-06-12 06:53:29 +00:00
|
|
|
echo "Starting container ..."
|
|
|
|
|
|
|
|
echo "Setup check cron job with cron expression CHECK_CRON: ${CHECK_CRON}"
|
|
|
|
echo "${CHECK_CRON} flock -n /tmp/check.lockfile /dnsupdater >> /var/log/cron.log 2>&1" > /var/spool/cron/crontabs/root
|
|
|
|
|
|
|
|
cat /var/spool/cron/crontabs/root
|
|
|
|
|
|
|
|
# Make sure the file exists before we start tail
|
|
|
|
touch /var/log/cron.log
|
|
|
|
|
|
|
|
# start the cron deamon
|
|
|
|
crond
|
|
|
|
|
|
|
|
echo "Container started."
|
|
|
|
|
|
|
|
if [[ -n "${CHECKONSTART}" ]]; then
|
|
|
|
flock -n /tmp/check.lockfile /dnsupdater
|
|
|
|
fi
|
|
|
|
|
|
|
|
tail -fn0 /var/log/cron.log
|