Post Reply 
 
Thread Rating:
  • 3 Vote(s) - 4.33 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tutorial] Installing MinimServer on FreeNAS or FreeBSD
31-01-2020, 06:52
Post: #51
RE: [Tutorial] Installing MinimServer on FreeNAS or FreeBSD
The player is wired... But there are mobile control point apps. And I am not sure that ethernet connection will help, it is the same router.
Find all posts by this user
Quote this message in a reply
05-02-2020, 04:28 (This post was last modified: 05-02-2020 04:43 by imush.)
Post: #52
RE: [Tutorial] Installing MinimServer on FreeNAS or FreeBSD
Somehow, after some network tweaking, it now works with eero router, although I cannot say why. If you have a similar problem, try eero customer support, they are very responsive and can do more tweaks than the user interface allows. It is a bit annoying that they have a backdoor that I cannot control, but I choose not to mind this for now and the wifi mesh works well.

Anyway, for a small token of contribution, here is my rc script which can do start and stop and looks more compliant with the rc.conf standard:

Code:
#!/bin/sh
#
# $FreeBSD: /usr/local/etc/rc.d/minimserver, 2020/02/03 05:55:56 isaac Exp $
#
# PROVIDE: minimserver
# KEYWORD: FreeBSD
#
# minimserver startup
#

. /etc/rc.subr
. /usr/local/etc/gnome.subr

minimserver_enable=${minimserver_enable}
minimserver_flags=${minimserver_flags}

name=minimserver
rcvar=minimserver_enable
minimserver_path=/usr/local/share/minimserver
start_cmd=minimserver_start
stop_cmd=minimserver_stop

minimserver_start() {
    PATH=${PATH}:/usr/local/sbin:/usr/local/bin
    export PATH
    LANG=en_US.UTF-8
    export LANG
    LC_CTYPE=en_US.UTF-8
    export LC_CTYPE
    LC_ALL=en_US.UTF-8
    export LC_ALL
    checkyesno minimserver_enable && echo "Starting minimserver." && \
        ${minimserver_path}/bin/startd ${minimserver_flags}
}

minimserver_stop() {
    checkyesno minimserver_enable && echo "Stopping minimserver." && \
        ${minimserver_path}/bin/stopall
}

load_rc_config ${name}
run_rc_command "$1"

Finally, the minimserver/bin/stopall will not work if you have an instance started from rc.conf because it is not attached to terminal. Therefore, I added -x option to the ps command options PSOPT there:

edit this line
Code:
PSOPT="-eo pid,user,vsz,stat,args"
to add the 'x'
Code:
PSOPT="-exo pid,user,vsz,stat,args"
Find all posts by this user
Quote this message in a reply
05-02-2020, 10:30
Post: #53
RE: [Tutorial] Installing MinimServer on FreeNAS or FreeBSD
(05-02-2020 04:28)imush Wrote:  Somehow, after some network tweaking, it now works with eero router, although I cannot say why. If you have a similar problem, try eero customer support, they are very responsive and can do more tweaks than the user interface allows. It is a bit annoying that they have a backdoor that I cannot control, but I choose not to mind this for now and the wifi mesh works well.

I'm happy it works for you now!

Quote:Anyway, for a small token of contribution, here is my rc script which can do start and stop and looks more compliant with the rc.conf standard:

Awesome! I will update my guide to include this improvement after testing. Same goes for the other suggestion of yours regarding PSOPT.
Find all posts by this user
Quote this message in a reply
09-02-2020, 13:48
Post: #54
RE: [Tutorial] Installing MinimServer on FreeNAS or FreeBSD
Update: I'm in the progress of re-building my jails with your suggested changes to test it later.

Just a question in between to @simoncn: Regarding the proposed change in the script "minimserver/bin/stopall" - wouldn't it make sense to include that specific change into the official version of minimserver?
Find all posts by this user
Quote this message in a reply
09-02-2020, 15:35 (This post was last modified: 09-02-2020 15:36 by simoncn.)
Post: #55
RE: [Tutorial] Installing MinimServer on FreeNAS or FreeBSD
No, because the -x option of the ps command is specific to BSD and causes an error when running on Linux.
Find all posts by this user
Quote this message in a reply
09-02-2020, 20:54
Post: #56
RE: [Tutorial] Installing MinimServer on FreeNAS or FreeBSD
(09-02-2020 15:35)simoncn Wrote:  No, because the -x option of the ps command is specific to BSD and causes an error when running on Linux.

Are you sure? -x is called 'BSD syntax' in the man page but works on Linux systems I have seen and seems to be there on Debian at my work. You could check for $(uname) to be sure. And by the way Darwin / Mac OSX is also a BSD style system and most likely needs the -x.
Find all posts by this user
Quote this message in a reply
09-02-2020, 22:16
Post: #57
RE: [Tutorial] Installing MinimServer on FreeNAS or FreeBSD
I am sure that it does not work on my Linux system. It returns an error saying that -x is an invalid option.

The stopall script is not part of the MinimServer installation on macOS, only on Linux.
Find all posts by this user
Quote this message in a reply
09-02-2020, 22:57
Post: #58
RE: [Tutorial] Installing MinimServer on FreeNAS or FreeBSD
When testing your suggested improvements, I found that

Code:
. /usr/local/etc/gnome.subr

does not work and seems to not be needed, so I removed it.

Also, when I start the service now, I get the following error-message:

Code:
root@services-ext:~ # service minimserver start
Starting minimserver.
Failed to start MinimServer

Apart from this message, I cannot find any problem in the minimserver-log and it works fine. So I incorporated the improvements in the tutorial.
Find all posts by this user
Quote this message in a reply
10-02-2020, 19:24
Post: #59
RE: [Tutorial] Installing MinimServer on FreeNAS or FreeBSD
(09-02-2020 22:57)airflow Wrote:  When testing your suggested improvements, I found that

Code:
. /usr/local/etc/gnome.subr

does not work and seems to not be needed, so I removed it.

Also, when I start the service now, I get the following error-message:

Code:
root@services-ext:~ # service minimserver start
Starting minimserver.
Failed to start MinimServer

Apart from this message, I cannot find any problem in the minimserver-log and it works fine. So I incorporated the improvements in the tutorial.

Yes, sorry, gnome.subr was definitely my garbage I overlooked.

I am not sure about the failed message. Are you sure that minimserver was not running? Does stop work?
Find all posts by this user
Quote this message in a reply
10-02-2020, 22:49
Post: #60
RE: [Tutorial] Installing MinimServer on FreeNAS or FreeBSD
I think the "Failed" message could be produced incorrectly if MinimServer is a bit slow to start. I will think about how to improve the check for this.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


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