docker-duplicity-cron/cron-exec.sh
2019-02-01 17:02:13 -08:00

12 lines
199 B
Bash
Executable File

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