As far as i understand it, all i need to do is run a small PP script after everything that gets the final directory name, and uses that to create the command to run on the system.
I have come up with this so far, but it does not work. I do not know any python so any help would be much appreciated.
I need to run the command "/home/declan/script/gdrive upload -p 0BwEBrlen3gVDWkFfeU5MZ19zN28 -r <directory here>"
and once that has completed, to delete that directory.
Code: Select all
import sys if [ "$NZBPP_TOTALSTATUS" != "SUCCESS" ]: print "[ERROR] This nzb-file was not processed correctly, terminating the script" sys.exit(95) if [ "$NZBPP_TOTALSTATUS" = "SUCCESS" ]: myCommand = "/home/declan/script/gdrive upload -p 0BwEBrlen3gVDWkFfeU5MZ19zN28 -r " myCommand += NZBPP_DIRECTORY return_code = subprocess.call(myCommand, shell=True) shutil.rmtree(NZBPP_DIRECTORY) sys.exit(93)