docker-duplicity-cron/cron-exec.sh

12 lines
199 B
Bash
Raw Permalink Normal View History

2019-02-01 21:48:00 +00:00
#! /bin/bash
ENV=/env.sh
2019-02-01 21:48:00 +00:00
LOG=/cron.log
HEALTH_FILE=/unhealthy
touch $ENV
source $ENV
2019-02-01 21:48:00 +00:00
# Execute command and write output to log
$@ 2>> $LOG && rm -f $HEALTH_FILE || { touch $HEALTH_FILE; exit 1; }