Posted: Wed Apr 25, 2012 2:34 am Post subject: Unable to read PATH environment variable
This is more of a question on BASH and rc scripting which I don't deal with alot.
I was trying to simplify my current method of starting pyTivo on my Synology NAS but when ever it starts from the rc script the Python os.getenv('PATH') returns None which goobers up the loading of the TiVo Now Playing lists. Running the script manually after startup or running pyTivo normally from console does not produce this error.
I've committed a fix to handle not finding PATH env variable to my repo but if anyone knows whats causing the differences I would like to find out so I can fix it in my rc script.
Here is the pyTivo portion of the script which is called directly from rc.local:
if [ $PYTIVO_RET -eq 0 ]; then
echo -n ""pyTivo already running.""
elif [ -x $PYTIVO_DIR/pyTivo.py ]; then
echo -n ""Starting pyTivo: ""
$PYTHON pyTivo.py > /var/log/pyTivo.log 2>&1 &
[ $PYTIVO_RET -eq 0 ] && echo -n ""done""
if [ $PYTIVO_RET != 0 ]; then
echo -n ""Error executing pyTivo.""
I thought it might be how I'm calling pyTivo in the startup process but I've tried a few different ways. I guess it's just something I'm not understanding about how the rc system works. The old method worked fine but I was trying to simplify it, which was rc.local->pytivo rc script in etc/rc.d->startup script (which resided in the pyTivo folder).
Any tips on what's going on? _________________ My pyTivo fork - Read link for changes
FFmpeg for OS X
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum