#!/bin/sh set -e #################################################################################################### ### Crontab settings #################################################################################################### cat<> /var/log/update_camera_$(date +\%Y\%m\%d\%H\%M\%S).log 2>&1 EOF #################################################################################################### ### Run prescripts #################################################################################################### php /opt/init_db.php #TODO add db_migrations echo "Prescripts done" #################################################################################################### ### Run cmd #################################################################################################### # see: https://github.com/dubiousjim/dcron/issues/13 # ignore using `exec` for `dcron` to get another pid instead of `1` # exec "$@" "$@"