Page 1 of 1

[Synology][upnp] Post process script error

Posted: April 18th, 2011, 11:02 am
by differenthink
Hello,

I m trying to run a post process script that will update my synology upnp index (synoindex) when the download is done.

My script is pretty simple :

Code: Select all

#!/bin/bash
/usr/syno/bin/synoindex -a "$1"
/usr/syno/bin/synoindex -A "$1"

Code: Select all

Here is the error i ve from Sabnzb :
2011-04-18 05:28:37,692::INFO::[newsunpack:127] Running external script /volume1/Downloads/scripts/upnp_update.sh(/volume1/video/Series/Desperate Housewives/Season 7, Desperate.Housewives.S07E18.720p.HDTV.X264-DIMENSION.nzb, Desperate.Housewives.S07E18.720p.HDTV.X264-DIMENSION, , tv, alt.binaries.teevee, 0)
2011-04-18 05:28:37,807::INFO::[newsunpack:134] Failed script /volume1/Downloads/scripts/upnp_update.sh, Traceback: 
Traceback (most recent call last):
  File "/usr/local/sabnzbd/share/SABnzbd/sabnzbd/newsunpack.py", line 132, in external_processing
    startupinfo=stup, env=env, creationflags=creationflags)
  File "/usr/local/sabnzbd/lib/python2.6/subprocess.py", line 623, in __init__
    errread, errwrite)
  File "/usr/local/sabnzbd/lib/python2.6/subprocess.py", line 1141, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
I don't really understand where is the problem.
The command "/usr/syno/bin/synoindex -a " is working, i checked in console.
Is the problem on the file path ? i don't know how to test it...
I also thought about permission problem, but my script is chmod 777...

So any help would be very appreciated.

Thank you.

Re: [Synology][upnp] Post process script error

Posted: April 18th, 2011, 8:17 pm
by shypike
Did you set the execute bit of the script?
chmod +x /volume1/Downloads/scripts/upnp_update.sh

Re: [Synology][upnp] Post process script error

Posted: April 20th, 2011, 7:05 am
by differenthink
Yes i did... but it s still not working....
I really don t understand the problem.

Thank you

Re: [Synology][upnp] Post process script error

Posted: April 20th, 2011, 7:18 am
by shypike
Have you tried to run the script from a console?

Re: [Synology][upnp] Post process script error

Posted: April 20th, 2011, 7:24 am
by differenthink
Yes, it works great that way...
So for me the problem is either the path, or the permission (but i already checked that)...

About the path i don't know how to debug it... i use the "$1" which seems to be the right var for the path but maybe not....

thank you