1
0
Fork 0
This repository has been archived on 2022-08-09. You can view files and clone it, but cannot push or open issues or pull requests.
odoo-pos-distribution/backup/crondwrapper.sh

17 lines
417 B
Bash
Executable File

#!/usr/bin/env bash
echo "${BACKUP_SCHEDULE} resticbackup.sh >> /var/log/cron.log 2>&1" > /etc/crontabs/root
# start cron
default_crontabs_dir=/etc/crontabs
crond -L /var/log/cron.log -c ${CRONTABS_DIR:-$default_crontabs_dir}
# trap SIGINT and SIGTERM signals and gracefully exit
trap "echo \"stopping cron\"; kill \$!; exit" SIGINT SIGTERM
# start "daemon"
while true
do
cat /var/log/cron.log & wait $!
done