Corrected off by one in cron script due to empty log file potentially existing
This commit is contained in:
parent
18961ba5e2
commit
647c5fa894
6
cron.sh
6
cron.sh
@ -30,11 +30,11 @@ ENTRY='./run.sh'
|
||||
# cd into the bot's root path, set up the virtual environment, and run
|
||||
cd "$RUN_DIR"
|
||||
[ ! -f "$ENTRY" ] && echo "Cannot find entry: ${ENTRY}" && cd - > /dev/null && exit 1
|
||||
if [ ! -f "$LOG" ]; then
|
||||
"$ENTRY"
|
||||
if [ ! -s "$LOG" ]; then
|
||||
"$ENTRY" "$@"
|
||||
else
|
||||
LINE="$(expr `grep "^Profile" "$LOG" | grep -o '[0-9]*$' | tail -n 1` + 1)"
|
||||
"$ENTRY" -l "$LINE"
|
||||
"$ENTRY" "$@" -l "$LINE"
|
||||
fi
|
||||
|
||||
RETURN_CODE="$?"
|
||||
|
Reference in New Issue
Block a user