Project

General

Profile

Post Processing Script - not working

Added by Alistair Ruckus almost 4 years ago

Hi.

I run tvheadend on a dedicated box, for the life of me I can not get it to run a simple post processing shell script to update kodi on a different box.

the script is just:

curl --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.Scan", "id": "mybash"}' -H 'content-type: application/json;' http://x.x.x.x:8080/jsonrpc

and i have tried using that inside a shell script, with the full path in the post-processing option in tvh. I've tried putting /usr/bin/bash in front of the command. I've tried just using the curl command itself in the text box in tvh, i've tried putting /usr/bin/curl in there, but nothing ever seems to run. Watching the logs seems to indicate its executed but it never updates the library in Kodi. The permissions are set to execute, i can myself execute it from the hts account. I'm really at a loss for why it doesn't work and it's driving me slightly bonkers.

anyone got any ideas?

TIA!


Replies (3)

RE: Post Processing Script - not working - Added by Hiro Protagonist almost 4 years ago

The first line of your script should be:

#!/bin/bash

You may also need to provide the full path to curl.

Does the script work when you run it by hand?

You should run:

tail -f /path/to/kodi/log/file

While you run the script, maybe the script is working and kodi is throwing an error.

RE: Post Processing Script - not working - Added by Alistair Ruckus almost 4 years ago

yeah the script runs when executed from the hts shell account.

will try #!/bin/bash as that's the only thing i've not tried so far...

thanks!

RE: Post Processing Script - not working - Added by Alistair Ruckus almost 4 years ago

that did the trick, thank you!

    (1-3/3)