Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Autostart on headless NAS with FFP
09-09-2014, 14:00 (This post was last modified: 15-09-2014 14:32 by alexinc.)
Post: #1
Autostart on headless NAS with FFP
Hi guys,

maybe its an easy task for linux maniacs but i just dont get it why minimserver doesnt autostart on my Medion headless NAS with FFP running!?

installation and starting with sh /ffp/opt/minimserver/bin/startd runs flawless. after that i created minimserver.sh with following content under /ffp/start/:

Code:
#!/ffp/bin/sh

# PROVIDE: minimserver

. /ffp/etc/ffp.subr

name="minimserver"
command="/ffp/opt/minimserver/bin/startd"

run_rc_command "$1"

and made it executable with

Code:
chmod a+x /ffp/start/minimserver.sh

when restarting NAS minimserver doesnt get loaded. when running maually

Code:
sh /ffp/start/minimserver.sh start

minimserver gets started as well, so no problem with script i guess. may it be a problem with user rights? i installed minimserver as root!?

thx i.a. alex

ps: when checking ffp-log it says

Code:
* /ffp/start/minimserver.sh ...
Starting /ffp/opt/minimserver/bin/startd

so script is initialized but doesnt execute minimserver. Sad
Find all posts by this user
Quote this message in a reply
09-09-2014, 19:52
Post: #2
RE: Autostart on headless NAS with FFP
(09-09-2014 14:00)alexinc Wrote:  Hi guys,

maybe its an easy task for linux maniacs but i just dont get it why minimserver doesnt autostart on my Medion headless NAS with FFP running!?

installation and starting with sh /ffp/opt/minimserver/bin/startd runs flawless. after that i created minimserver.sh with following content under /ffp/start/:

Code:
#!/ffp/bin/sh

# PROVIDE: minimserver

. /ffp/etc/ffp.subr

name="minimserver"
command="/ffp/opt/minimserver/bin/startd"

run_rc_command "$1"

and made it executable with

Code:
chmod a+x /ffp/start/minimserver.sh

when restarting NAS minimserver doesnt get loaded. when running maually

Code:
sh /ffp/start/minimserver.sh start

minimserver gets started as well, so no problem with script i guess. may it be a problem with user rights? i installed minimserver as root!?

thx i.a. alex

ps: when checking ffp-log it says

Code:
* /ffp/start/minimserver.sh ...
Starting /ffp/opt/minimserver_sorted/bin/startd

so script is initialized but doesnt execute minimserver. Sad

It appears this is trying to start /ffp/opt/minimserver_sorted/bin/startd. It also appears the correct path is /ffp/opt/minimserver/bin/startd. Could this be the cause of the problem?
Find all posts by this user
Quote this message in a reply
10-09-2014, 22:09
Post: #3
RE: Autostart on headless NAS with FFP
(09-09-2014 19:52)simoncn Wrote:  It appears this is trying to start /ffp/opt/minimserver_sorted/bin/startd. It also appears the correct path is /ffp/opt/minimserver/bin/startd. Could this be the cause of the problem?

first of all thanks for replying. this was the last line i missed editing before posting my question. Wink i was running 2 instances of minimserver, sorted and unsorted. for easier explanation i changed everything to folder minimserver in this post but was missing the last line. Big Grin so problem still exists and log of course says now:

Code:
* /ffp/start/minimserver.sh ...
Starting /ffp/opt/minimserver/bin/startd

i even did a clean install of minimserver again for testing purpose but still didnt succeed. Sad
Find all posts by this user
Quote this message in a reply
10-09-2014, 22:23
Post: #4
RE: Autostart on headless NAS with FFP
(10-09-2014 22:09)alexinc Wrote:  first of all thanks for replying. this was the last line i missed editing before posting my question. Wink i was running 2 instances of minimserver, sorted and unsorted. for easier explanation i changed everything to folder minimserver in this post but was missing the last line. Big Grin so problem still exists and log of course says now:

Code:
* /ffp/start/minimserver.sh ...
Starting /ffp/opt/minimserver/bin/startd

i even did a clean install of minimserver again for testing purpose but still didnt succeed. Sad

Have you looked in the minimserver/data/minimserver.out and minimserver/data/minimserver.log files to see if there are any messages?
Find all posts by this user
Quote this message in a reply
15-09-2014, 14:32
Post: #5
RE: Autostart on headless NAS with FFP
(10-09-2014 22:23)simoncn Wrote:  Have you looked in the minimserver/data/minimserver.out and minimserver/data/minimserver.log files to see if there are any messages?

just found time to do so, but no errors in both files that would prevent minimserver from starting. then manual start shouldnt work either!? i have no idea why starting manually through command prompt is working, but autostart doesnt do the trick? Sad
Find all posts by this user
Quote this message in a reply
15-09-2014, 22:07
Post: #6
RE: Autostart on headless NAS with FFP
(15-09-2014 14:32)alexinc Wrote:  just found time to do so, but no errors in both files that would prevent minimserver from starting. then manual start shouldnt work either!? i have no idea why starting manually through command prompt is working, but autostart doesnt do the trick? Sad

If there is output in either of these files after a "failed" autostart, this indicates that MinimServer did autostart. Can you try deleting these files and attempting an autostart to confirm this?
Find all posts by this user
Quote this message in a reply
18-09-2014, 14:19 (This post was last modified: 18-09-2014 14:23 by alexinc.)
Post: #7
RE: Autostart on headless NAS with FFP
the solution is way easier than expected and i have to give mijzelf (developer of ffp) full credit for analyzing and solving the cause! of course a big THX to you too for taking the time and minimserver in general! Smile i'm still loving it that much, serving my audio the way i want it to be...
i added the java.sh line to my minimserver startup script!

Mijzelf Wrote:I never heard of minimserver, so I downloaded it and looked at the startscript startd. It calls java.

Code:
cd "${MINIMDIR}/data"LD_LIBRARY_PATH="${MINIMDIR}/libsys" java -jar "${MINIMDIR}/lib/mserver.jar" --noconsole --nohup "$@" </dev/null >minimserver.out 2>&1 &

When I looked at Uli's instructions for java on ffp, I found this:

now put it permanently into the environment variables:

Code:
echo "export PATH=/ffp/opt/java/jre/bin:\$PATH" >> /ffp/etc/profile.d/java.sh
chmod a+x /ffp/etc/profile.d/java.sh

So if you followed these instructions, java cannot be found, unless the java.sh script is executed, which is only done in a 'normal' shell. Maybe you can just provide the full path of java in startd. Or you can add a line

Code:
. /ffp/etc/profile.d/java.sh

to your startscript, before

Code:
run_rc_command "$1"
Find all posts by this user
Quote this message in a reply
18-09-2014, 14:35
Post: #8
RE: Autostart on headless NAS with FFP
(18-09-2014 14:19)alexinc Wrote:  the solution is way easier than expected and i have to give mijzelf (developer of ffp) full credit for analyzing and solving the cause! of course a big THX to you too for taking the time and minimserver in general! Smile i'm still loving it that much, serving my audio the way i want it to be...
i added the java.sh line to my minimserver startup script!

Thanks for posting the solution. I'm glad it's working now.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)