mirror of
https://github.com/ViViDboarder/docker-duplicity-cron.git
synced 2024-11-23 18:26:31 +00:00
19 lines
283 B
Bash
Executable File
19 lines
283 B
Bash
Executable File
#! /bin/bash
|
|
|
|
ENV=/env.sh
|
|
LOG=/cron.log
|
|
HEALTH_FILE=/unhealthy
|
|
|
|
if [ -f "$ENV" ]; then
|
|
# shellcheck disable=SC1090
|
|
source "$ENV"
|
|
fi
|
|
|
|
# Execute command and write output to log
|
|
if eval "$@" 2>> "$LOG"; then
|
|
rm -f "$HEALTH_FILE"
|
|
else
|
|
touch "$HEALTH_FILE"
|
|
exit 1;
|
|
fi
|