Don't post process on certain conditions

We don't want to snatch next release when the error is an NZBGet config problem, or the download hasn't finished yet.
In these conditions, the actual download may be recoverable.
This commit is contained in:
clinton-hall 2012-12-12 18:27:37 -08:00
commit f7b3d60496

View file

@ -173,7 +173,7 @@ if [ ! -f "$ScriptConfigFile" ]; then
fi fi
if [ ! -f "$ScriptConfigFile" ]; then if [ ! -f "$ScriptConfigFile" ]; then
echo "[ERROR] Post-Process: Configuration file $ScriptConfigFile not found, exiting" echo "[ERROR] Post-Process: Configuration file $ScriptConfigFile not found, exiting"
do_exit $POSTPROCESS_ERROR exit $POSTPROCESS_ERROR
fi fi
# Readg configuration file # Readg configuration file
@ -199,13 +199,13 @@ fi
if [ "$BadConfig" -eq 1 ]; then if [ "$BadConfig" -eq 1 ]; then
echo "[ERROR] Post-Process: Exiting because of not compatible nzbget configuration" echo "[ERROR] Post-Process: Exiting because of not compatible nzbget configuration"
do_exit $POSTPROCESS_ERROR exit $POSTPROCESS_ERROR
fi fi
# Check if all collections in nzb-file were downloaded # Check if all collections in nzb-file were downloaded
if [ ! "$NZBPP_NZBCOMPLETED" -eq 1 ]; then if [ ! "$NZBPP_NZBCOMPLETED" -eq 1 ]; then
echo "[INFO] Post-Process: Not the last collection in nzb-file, exiting" echo "[INFO] Post-Process: Not the last collection in nzb-file, exiting"
do_exit $POSTPROCESS_SUCCESS exit $POSTPROCESS_SUCCESS
fi fi
# Check par status # Check par status