Need help with a very simple POST-PROCESS script

Share your scripts or request scripts with specific features.
Forum rules
Please keep the forum clean - one topic per script. Questions not related to a specific script should be posted in Support forum.
Post Reply
feoZA
Posts: 22
Joined: 08 Jan 2015, 18:08

Need help with a very simple POST-PROCESS script

Post by feoZA » 24 Apr 2015, 12:39

Hi there

First off, I absolutely love NZBGet, it's the best download client I've used.

Second, I'm a n00b at scripting in general so please take it easy on me.

I have basically written a 2-liner script that will wake up the machine that's running Plex Server (this is a different machine that the one where NZBGet is running) and then it will update the TV Show library.

This is the script:

Code: Select all

#!/bin/bash

###########################################################
### NZBGET POST-PROCESSING SCRIPT

# Step 1: Sends a magic packet to the Plex Media Server
# Step 2: Executes the URL to update the TV Shows Library

### NZBGET POST-PROCESSING SCRIPT
###########################################################


# First send a magic packet to the Plex Server to wake it up
# Plex Server MAC Address: D8:CB:8A:38:DD:FD

wakeonlan D8:CB:8A:38:DD:FD

# Update the Plex TV Show Library

wget http://192.168.0.101:32400/library/sections/2/refresh
When I run this script from the command line it works perfectly. It sends a magic packet to the Plex machine, wakes it up and then starts the TV Show library refresh. Great!

So I dump this script into the NZBGet scripts folder and add it to the default scripts for the 'tv' category.

But every time a download finishes, the step where this script is executed shows an error, for example:

Image

Can anyone help me get rid of that error?

All my downloads show PP-FAILURE because of this failed post-processing step.

Thanks

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: Need help with a very simple POST-PROCESS script

Post by hugbug » 24 Apr 2015, 13:38

See section Exit codes in the documentation for extension scripts (link at the top of this page, then Extension scripts).

feoZA
Posts: 22
Joined: 08 Jan 2015, 18:08

Re: Need help with a very simple POST-PROCESS script

Post by feoZA » 24 Apr 2015, 14:02

Beautiful, thanks!

Post Reply

Who is online

Users browsing this forum: No registered users and 33 guests