Blame background.sh

850862
set -e
850862
850862
850862
BASE_DIR=$(cd `dirname "$0"`; pwd)
850862
CONFIG_FILE="$BASE_DIR/config.sh"
850862
if [ -f "$CONFIG_FILE" ]; then
850862
    source "$CONFIG_FILE"
850862
fi
850862
850862
850862
LOG_FILE="$BASE_DIR/log/background.log"
850862
850862
echo "-------------------------------" >> "$LOG_FILE"
850862
date                                   >> "$LOG_FILE"
850862
echo background.sh "$@"                >> "$LOG_FILE"
850862
echo "-------------------------------" >> "$LOG_FILE"
850862
850862
if [ "$1" == "-q" ]; then
850862
    export EMAIL_SUCCESS=
850862
    nohup "$BASE_DIR/withemail.sh" ${@:2} &>> "$LOG_FILE" &
850862
else
850862
    nohup "$BASE_DIR/withemail.sh" $@ &>> "$LOG_FILE" &
850862
fi
850862
850862
echo "task now in backround"