#!/bin/bash set -e # Start cron service cron start # Update crontab with the specified refresh time hour=$(echo $REFRESH_TIME | cut -d':' -f1) minute=$(echo $REFRESH_TIME | cut -d':' -f2) echo "$minute $hour * * * /usr/local/bin/refresh.sh >> /var/log/cron.log 2>&1" > /etc/cron.d/refresh-cron chmod 0644 /etc/cron.d/refresh-cron # Start PostgreSQL exec docker-entrypoint.sh postgres