Post-process script failing to launch
Posted: November 24th, 2013, 6:05 am
So, like everyone else, I run Sab with Sickbeard, and, unfortunately, I have Python3 & Python2 installed. If I tell Sab to use "sabToSickBeard.py", it defaults for Python3 (Which is what I want), however, that causes syntax errors. So, I thought, "Well, that's easy to change, I just have to create a small bash script to run the python script with python2":-
However, that errors out with:-
SABnzbd is running as a specific user for the daemon, 'sabnzbd', and, I can manually execute the bash script fine as that user:-
So, I know I could convert the whole post process script to python3, or, change my default python application from python3 to python2, but, both of those are a pain. Can someone tell me why my bash script fails to run in SABnzbd, and, not with bash?
Thanks,
Automatic.
P.S. Because I know someone will ask:-
File permissions:-
Process list:-
EDIT:- Uh-oh, I may be stupid, just realized I was using a relative path in the bash script for the Python file. Testing this out, hopefully I didn't just publicly post my idiocy.
EDIT2: Same issue with this script:-
Code: Select all
/usr/bin/python2 sabToSickBeard.py "$@"
Code: Select all
Exit(-1) Cannot run script /mnt/ssd/PostProcessing/sabToSickBeard.sh (More)
Code: Select all
[sabnzbd@ServerUK PostProcessing]$ /mnt/ssd/PostProcessing/sabToSickBeard.sh
No folder supplied - is this being called from SABnzbd?
Thanks,
Automatic.
P.S. Because I know someone will ask:-
File permissions:-
Code: Select all
[sabnzbd@ServerUK PostProcessing]$ ls -lsa
total 28
4 drwxr-x--- 2 sabnzbd daemons 4096 Nov 24 11:01 .
4 drwxr-xr-x 7 root root 4096 Nov 24 09:17 ..
4 -rwxr----- 1 sabnzbd daemons 105 Nov 24 09:18 autoProcessTV.cfg
4 -rwxr----- 1 sabnzbd daemons 3134 Nov 20 21:23 autoProcessTV.py
4 -rwxr----- 1 sabnzbd daemons 2825 Nov 24 09:47 autoProcessTV.pyc
4 -rwxr----- 1 sabnzbd daemons 1049 Nov 24 11:01 sabToSickBeard.py
4 -rwxr----- 1 sabnzbd daemons 40 Nov 24 10:52 sabToSickBeard.sh
Code: Select all
sabnzbd 3967 9.4 0.8 2979184 67516 ? Sl 10:02 5:54 python2 /mnt/ssd/SABnzbd/SABnzbd.py -d --config-file /mnt/ssd/SABnzbd/SABnzbd.ini
EDIT2: Same issue with this script:-
Code: Select all
/usr/bin/python2 "/mnt/ssd/PostProcessing/sabToSickBeard.py" "$@"