![]() |
|
WD MyCloud and Minimserver - Printable Version +- MinimServer Forum (https://forum.minimserver.com) +-- Forum: MinimServer (/forumdisplay.php?fid=1) +--- Forum: General (/forumdisplay.php?fid=2) +--- Thread: WD MyCloud and Minimserver (/showthread.php?tid=2310) |
RE: WD MyCloud and Minimserver - Tbanks103 - 07-02-2018 16:40 (04-02-2018 22:18)simoncn Wrote: ... Hmm.. no, that appears not to work (but I can test something else, if you can figure it out) MyBookLive:~# ls -tral /shares/Public/Minim/minimserver/etc/minimstart.conf <-- check I made it right... -rw-rw-rw- 1 root root 47 Feb 7 13:40 /shares/Public/Minim/minimserver/etc/minimstart.conf MyBookLive:~# tail -100 /shares/Public/Minim/minimserver/etc/minimstart.conf <--- list the contents... JAVA=/shares/Public/Java/ejre1.7.0_75/bin/java MyBookLive:~# ls /shares/Public/Java/ejre1.7.0_75/bin/java /shares/Public/Java/ejre1.7.0_75/bin/java <-- yes, this is where java is. MyBookLive:~# ls -tral /shares/Public/Minim/minimserver/data/minimserver-out.log -rw-rw-rw- 1 root root 79 Feb 7 15:08 /shares/Public/Minim/minimserver/data/minimserver-out.log MyBookLive:~# tail -100 /shares/Public/Minim/minimserver/data/minimserver-out.log <-- log contents after reboot. (minim not started.) /shares/Public/Minim/minimserver/bin/startd: line 125: java: command not found MyBookLive:~# /etc/rc2.d/S99minimserver start <--- yep. That still works in the shell environment... MyBookLive:~# which java <-- check where java really is... /usr/local/bin/java MyBookLive:~# ls -tral /usr/local/bin/java lrwxrwxrwx 1 root root 41 Jan 31 11:45 /usr/local/bin/java -> /shares/Public/Java/ejre1.7.0_75/bin/java MyBookLive:~# RE: WD MyCloud and Minimserver - simoncn - 07-02-2018 18:33 Your minimstart.conf file should contain java= (lower case), not JAVA=. RE: WD MyCloud and Minimserver - Tbanks103 - 07-02-2018 19:17 (07-02-2018 18:33)simoncn Wrote: Your minimstart.conf file should contain java= (lower case), not JAVA=. Ah yes - that helps. It works now. Let me know if you want me to try out the out-of-the-box installation. Also, I found http://manpages.ubuntu.com/manpages/precise/man8/update-rc.d.8.html which helps explain how to customize the init process, and seems like a safe (but complex!) way to set things up - mybooklive has this update-cr.d command and the .legacy-bootordering is an empty file. There is no insserv command. Hope that helps more than it confuses... RE: WD MyCloud and Minimserver - simoncn - 07-02-2018 19:56 Thanks for confirming this. The only other difference is the S99 change. This appears to default to S01 if NN is not specified as an argument to update-rc.d, which would cause MinimServer to be started earlier in the boot process than with S99. Some descriptions of update-rc.d don't mention the NN argument, so I am not sure whether I can rely on this working for all platforms. If you could try "out of the box" (which I presume would use S01), I would appreciate it. I am not familiar with either .legacy-bootordering or insserv. MinimServer doesn't use either of these. RE: WD MyCloud and Minimserver - Tbanks103 - 08-02-2018 12:28 (07-02-2018 19:56)simoncn Wrote: Thanks for confirming this. The only other difference is the S99 change. This appears to default to S01 if NN is not specified as an argument to update-rc.d, which would cause MinimServer to be started earlier in the boot process than with S99. Some descriptions of update-rc.d don't mention the NN argument, so I am not sure whether I can rely on this working for all platforms. If you could try "out of the box" (which I presume would use S01), I would appreciate it. To try and unravel the update-rc.d knot a little, I tried the following: MyBookLive:~# update-rc.d -n minimserver defaults Adding system startup for /etc/init.d/minimserver ... /etc/rc0.d/K20minimserver -> ../init.d/minimserver /etc/rc1.d/K20minimserver -> ../init.d/minimserver /etc/rc6.d/K20minimserver -> ../init.d/minimserver /etc/rc2.d/S20minimserver -> ../init.d/minimserver /etc/rc3.d/S20minimserver -> ../init.d/minimserver /etc/rc4.d/S20minimserver -> ../init.d/minimserver /etc/rc5.d/S20minimserver -> ../init.d/minimserver The default priority of 20 is obviously arbitrary, and anyway not appropriate for the corresponding shutdown stages (the K's - which should be at 100-the S's priority), but this result describes which rcN.d links are created. Note that the -n option is for 'don't actually do anything' Instead, I tweaked the command and tested out the following: MyBookLive:~# update-rc.d minimserver start 85 2 3 4 5 . stop 15 0 1 6 . Adding system startup for /etc/init.d/minimserver ... /etc/rc0.d/K15minimserver -> ../init.d/minimserver /etc/rc1.d/K15minimserver -> ../init.d/minimserver /etc/rc6.d/K15minimserver -> ../init.d/minimserver /etc/rc2.d/S85minimserver -> ../init.d/minimserver /etc/rc3.d/S85minimserver -> ../init.d/minimserver /etc/rc4.d/S85minimserver -> ../init.d/minimserver /etc/rc5.d/S85minimserver -> ../init.d/minimserver Priority 85 is what is used by another (ahem) media server on my installation. This can't be a global (all unixes) solution, since - as described here - BSD distributions don't have the rcN.d directories, and some other Linux's have them, but not the update-rc.d command. Could you test for the presence of the command? RE: WD MyCloud and Minimserver - simoncn - 09-02-2018 15:36 This command (specifying SS=85 and KK=15) is working for you because the WD MyCloud has a /etc/init.d/.legacy-bootordering file. I tried the same command on a Debian system that uses dependency-based boot sequencing and it created all the links as S01 and K01. With dependency-based boot sequencing, it isn't possible to specify absolute SS and KK numbers but it is possible to specify $all in the service file to force the service to start last and stop first (presumably suitable for MinimServer). So a possible approach would be: Code: if update-rc.d exists thenThere is already some special code for certain systems without update-rc.d and I don't propose to change this at present because of the risk of breaking things. RE: WD MyCloud and Minimserver - simoncn - 20-02-2018 23:27 I have made this change in a test build. Please check your PMs for details of how to download the test build. Many thanks! RE: WD MyCloud and Minimserver - Tbanks103 - 22-02-2018 12:06 (20-02-2018 23:27)simoncn Wrote: I have made this change in a test build. Please check your PMs for details of how to download the test build. Many thanks! The test build works well. Thanks. As a way of providing multiple versions of my content files (my TV only understands mp3 files) I set up a second minimserver and found it installed an appropriate additional startd command in /etc/init.d/minimserver so extra applause is due for this ![]() See PM reply for more feedback. RE: WD MyCloud and Minimserver - Soli - 16-03-2018 22:06 (04-02-2018 13:09)Tbanks103 Wrote: I can't see that new thread, but I have made the init process on my MyBookLive kick off the minimserver.Greetings. I forgot all about it. I just logged in today to start a new thread and saw this. What I did was to verify that mybooklive actually did parse SYSV files. After I did that, I knew that wasn't the reason Minimserver didn't automatically start. Earlier in the thread someone just made a symlink to java. (if /opt/Java is where you extracted java, and the version is ejre1.7.0_75) "ln -s /opt/Java/ejre1.7.0_75/bin/java /usr/local/bin/java". For some reason that works fine when manually starting Minimserver but not automatically. There probably a technical reason for that, but I don't really care. (but it was probably the path missing in either the SYSV file or conf) The solution is simple: Install our custom java the normal way! #update-alternatives --install /usr/bin/java java /opt/Java/ejre1.7.0_75/bin/java 100 That's all! To verify #update-alternatives --display java Then just run the Minimserver startd command if you haven't already #/opt/minimserver/bin/startd No need to mess around with anything else whatsoever. I'm also running a pure Debian 8 on my newer MyCloud gen2, it too works perfectly with Minimserver! |