LinHES Forums
http://forums.linhes.org/

Command driving me crazy!!!
http://forums.linhes.org/viewtopic.php?f=5&t=7971
Page 1 of 1

Author:  scanman717 [ Thu Jan 19, 2006 8:41 pm ]
Post subject:  Command driving me crazy!!!

Ok, I am using Edna MP3 Server.. Works great, but, I cannot get the thing to autostart...

If I ssh in and do cd /usr/share/edna hit return, then ./edna.py & The program executes fine....

So, it would make sense that I could do this: /usr/share/edna/edna.py & But this give me an error about no edna.conf file found....

So can someone help me figure out what I am doing wrong?? thanks.

Author:  Girkers [ Thu Jan 19, 2006 8:48 pm ]
Post subject: 

This might be a stab in the dark but try this.

When you start it the first way you are actually in the directory that contains the script and I suspect the conf file as well.

When you do it the second way you are not, thus the script does not know where to find the script.

You try writing a script such as:
Code:
#!/bin/sh
cd /usr/share/edna
./edna.py &


Just a thought :wink:

Author:  tjc [ Thu Jan 19, 2006 8:56 pm ]
Post subject: 

Sounds like the script either isn't smart enough to find the config file anywhere other than the current directory or needs an environment variable set to help it. Read the code, look for where it opens the file (in Python source search for either "open" or "file" ...), and see if it's just "edna.conf". A smart script will either go to the right directory on their own (search for "chdir"), or open things using full path names...

OBTW - Girkers bandaid script is also the type of "fix" I use when dealing with OP dumb code that I can't just correct.

Author:  scanman717 [ Thu Jan 19, 2006 9:08 pm ]
Post subject:  Thanks

Thanks guys.. I actually did both, and now it works!! YAY!!!

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/