If the IP is your own (non-VPN) ip address it pauses downloading. When it is connected to VPN again it resumes downloading.
I am very novice on writing scripts, and my programming knowledge is almost as ancient as the egyptian pyramids, so this can surely be done with much less code ....
Also i couldn't manage to set the parameters from within NZBget, so you'll have to enter them in the script. The lines to edit in the script are the ones shown below.
I hope some one can use this script
Code: Select all
# Temporary file for storing actual ip address last time the script was run, used to determine if the ip address changed so action is required cIpFile="/share/MD0_DATA/Download/nzbToMedia/NZBGet.ip" # The start range for your own (non-VPN) ip address for example "74." or "95.100." or a full address like "188.8.131.52" cOwnIpStartRange="74." # The command to execute NZBget, including full path. cExecute="/share/MD0_DATA/.qpkg/NZBGet/nzbget/nzbget"