2 changed files with 6 additions and 5 deletions
@ -1,10 +1,11 @@
|
||||
#! /bin/bash |
||||
|
||||
ENV=/env |
||||
ENV=/env.sh |
||||
LOG=/cron.log |
||||
HEALTH_FILE=/unhealthy |
||||
|
||||
test -f $ENV || echo NO_ENV=true > $ENV |
||||
touch $ENV |
||||
source $ENV |
||||
|
||||
# Execute command and write output to log |
||||
env `cat $ENV | xargs` $@ 2>> $LOG && rm -f $HEALTH_FILE || { touch $HEALTH_FILE; exit 1; } |
||||
$@ 2>> $LOG && rm -f $HEALTH_FILE || { touch $HEALTH_FILE; exit 1; } |
||||
|
Loading…
Reference in new issue