docker-duplicity-cron/cron-exec.sh

12 行
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; }