Advertisement
Binomico

pyLoad package_finished

Mar 28th, 2011
287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.06 KB | None | 0 0
  1. #!/bin/sh
  2. ###########################################################################
  3. # CONFIGURATION ###########################################################
  4. ###########################################################################
  5. CHECK=`find "/volume1/public/downloads/" -maxdepth 1 -type f -name "*.avi"`
  6. PROOF=`find "/volume1/public/downloads/" -maxdepth 1 -type f -name "*.mp4"`
  7. DIR_IN=/volume1/public/downloads/
  8. DIR_END=/volume1/public/downloads/scripts/incomming/
  9. DIR_SC=/opt/pyload/scripts/unrar_finished/
  10.  
  11.    if test -n "$CHECK" -a -n "$PROOF"
  12.       then { cd $DIR_IN ; mv *.avi $DIR_END ; mv *.mp4 $DIR_END ;
  13.         cd $DIR_SC ; sh runscript.sh ; }
  14.    elif test -n "$CHECK"
  15.       then { cd $DIR_IN ; mv *.avi $DIR_END ; cd $DIR_SC ; sh runscript.sh ; }
  16.    elif test -n "$PROOF"
  17.       then { cd $DIR_IN ; mv *.mp4 $DIR_END ; cd $DIR_SC ; sh runscript.sh ; }
  18.    else
  19. exit
  20.    fi
  21. exit 0
  22. ###########################################################################
  23. # End of script
  24. ###########################################################################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement