I have transmission 2.51 installed inside a FreeBSD jail. the client is working perfectly as user nobody and I was trying to setup a script when torrent finish downloading to process some scripts that will perform specific tasks.
My settings.json contains:
Code: Select all
"script-torrent-done-enabled": true,
"script-torrent-done-filename": "/work/transmission/posttorrent.sh",
Code: Select all
#!/bin/bash
{
start_time=`date +%s`
# Log file, file where we tell what events have been processed.
LOG=/work/transmission/posttorrent.log
echo "Now searching for Subtitles" > $LOG 2>&1
echo $start_time >> $LOG 2>&1
echo "***************************************" >> $LOG 2>&1
subliminal -l en PATH /work/finished >> $LOG 2>&1
echo "***************************************" >> $LOG 2>&1
echo "Now Sorting TV-Series" >> $LOG 2>&1
echo "***************************************" >> $LOG 2>&1
python /usr/local/lib/python2.7/site-packages/FlexGet-1.0-py2.7.egg/flexget/flexget_vanilla.py --logfile /work/.flexget/flexget-sorting.log -c /work/.flexget/sorting$
echo "***************************************" >> $LOG 2>&1
echo "Now Sorting Movie" >> $LOG 2>&1
echo "***************************************" >> $LOG 2>&1
python /usr/local/lib/python2.7/site-packages/FlexGet-1.0-py2.7.egg/flexget/flexget_vanilla.py --logfile /work/.flexget/flexget-sorting.log -c /work/.flexget/sorting$
#periscope /usr/local/working -l en >> $LOG 2>&1
echo "***************************************" >> $LOG 2>&1
echo Finally cleanning Completed Torrents.. >> $LOG 2>&1
echo "***************************************" >> $LOG 2>&1
transmission-remote -l | grep 100% | grep Done | awk '{print $1}' | xargs -n 1 -I % transmission-remote -t%, -r >> $LOG 2>&1
end_time=`date +%s`
echo "***************************************" >> $LOG 2>&1
echo run time is $(expr `date +%s` - $start_time) s >> $LOG 2>&1
} &
Code: Select all
Now searching for Subtitles
1352710084
***************************************
...
OSError: [Errno 2] No such file or directory: '//.config/subliminal'
...
***************************************
Now Sorting TV-Series
***************************************
***************************************
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/FlexGet-1.0-py2.7.egg/flexget/flexget_vanilla.py", line 8, in <module>
import flexget
File "/usr/local/lib/python2.7/site-packages/FlexGet-1.0-py2.7.egg/flexget/__init__.py", line 9, in <module>
from flexget.manager import Manager
File "/usr/local/lib/python2.7/site-packages/FlexGet-1.0-py2.7.egg/flexget/manager.py", line 8, in <module>
import sqlalchemy
File "build/bdist.freebsd-8.3-RELEASE-p4-amd64/egg/sqlalchemy/__init__.py", line 52, in <module>
File "build/bdist.freebsd-8.3-RELEASE-p4-amd64/egg/sqlalchemy/types.py", line 33, in <module>
except NameError:
File "build/bdist.freebsd-8.3-RELEASE-p4-amd64/egg/sqlalchemy/processors.py", line 98, in <module>
File "build/bdist.freebsd-8.3-RELEASE-p4-amd64/egg/sqlalchemy/cprocessors.py", line 7, in <module>
File "build/bdist.freebsd-8.3-RELEASE-p4-amd64/egg/sqlalchemy/cprocessors.py", line 4, in __bootstrap__
File "/usr/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 882, in resource_filename
File "/usr/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 1351, in get_resource_filename
File "/usr/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 1373, in _extract_resource
File "/usr/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 962, in get_cache_path
File "/usr/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 928, in extraction_error
pkg_resources.ExtractionError: Can't extract file(s) to egg cache
The following error occurred while trying to extract file(s) to the Python egg
cache:
[Errno 13] Permission denied: '//.python-eggs'
The Python egg cache directory is currently set to:
//.python-eggs
Perhaps your account does not have write access to this directory? You can
change the cache directory by setting the PYTHON_EGG_CACHE environment
variable to point to an accessible directory.
***************************************
Now Sorting Movie
***************************************
....
...
pkg_resources.ExtractionError: Can't extract file(s) to egg cache
The following error occurred while trying to extract file(s) to the Python egg
cache:
[Errno 13] Permission denied: '//.python-eggs'
The Python egg cache directory is currently set to:
//.python-eggs
Perhaps your account does not have write access to this directory? You can
change the cache directory by setting the PYTHON_EGG_CACHE environment
variable to point to an accessible directory.
***************************************
Finally cleanning Completed Torrents..
***************************************
localhost:9091/transmission/rpc/ responded: "success"
***************************************
run time is 3 s
any idea how to solve this?
I tried to run transmission as root and transmission user, however there was other type of errors as well.
appreciate the help.