mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-21 05:43:16 -07:00
better failed delete/move options #98
if no failed folder is specified, it won't move if specified, files are moved to category sub directory, in their own nzbname directory. And a test to ensure we don't delete the config directory.
This commit is contained in:
parent
00f21eba60
commit
b1a02c228a
1 changed files with 6 additions and 3 deletions
|
@ -221,13 +221,16 @@ do_exit() {
|
|||
if [ "$Debug" = "yes" ]; then echo "[DETAIL] Post-Process: Executing function 'do_exit' with argument $1" | tee -a $tmplog; fi
|
||||
nzbStatus=0
|
||||
if [ "$1" -ne "$POSTPROCESS_SUCCESS" ]; then
|
||||
if [ "$Delete_Failed" = "yes" ]; then
|
||||
cd $NZBPP_DIRECTORY
|
||||
if [ "$Delete_Failed" = "yes" -a "$NZBPP_DIRECTORY" != "$ConfigDir" ]; then
|
||||
rm * >/dev/null 2>&1
|
||||
cd ..
|
||||
rmdir $NZBPP_DIRECTORY
|
||||
else
|
||||
elif [ "$NZBPP_DIRECTORY" != "$ConfigDir" -a "$Failed_Directory" != "" ]
|
||||
mkdir $Failed_Directory
|
||||
mv * $Failed_Directory >/dev/null 2>&1
|
||||
mkdir $Failed_Directory/$NZBPP_CATEGORY
|
||||
mkdir $Failed_Directory/$NZBPP_CATEGORY/$NZBPP_NZBNAME
|
||||
mv * $Failed_Directory/$NZBPP_CATEGORY/$NZBPP_NZBNAME >/dev/null 2>&1
|
||||
cd ..
|
||||
rmdir $NZBPP_DIRECTORY
|
||||
NZBPP_DIRECTORY=$Failed_Directory
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue