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