Post Reply 
 
Thread Rating:
  • 3 Vote(s) - 4.33 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tutorial] Installing MinimServer on FreeNAS or FreeBSD
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
Post Reply 


Messages In This Thread
RE: [Tutorial] Installing MinimServer on FreeNAS or FreeBSD - imush - 05-02-2020 04:28

Forum Jump:


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