sysutils/nginx-ui: Add workaround for stale UNIX socket

If, for example, there is a power failure, the UNIX socket file will
be left and the error "connect: connection refused" will be displayed,
so the best thing to do is to delete it before starting NGINX UI.
This commit is contained in:
Jesús Daniel Colmenares Oviedo 2025-09-12 02:29:56 -04:00
parent cc249d533c
commit 0b52e70543
2 changed files with 5 additions and 1 deletions

View File

@ -1,7 +1,7 @@
PORTNAME= nginx-ui
DISTVERSIONPREFIX= v
DISTVERSION= 2.1.17
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= sysutils
MASTER_SITES= LOCAL/dtxdf/${PORTNAME}/
DISTFILES= ${PORTNAME}-${DISTVERSIONPREFIX}${DISTVERSION}.frontend${EXTRACT_SUFX} \

View File

@ -28,5 +28,9 @@ pidfile="/var/run/nginx-ui.pid"
procname="%%LOCALBASE%%/bin/nginx-ui"
command="/usr/sbin/daemon"
command_args="-o ${nginx_ui_log} -u ${nginx_ui_runas} -p ${pidfile} -t \"${desc}\" ${procname}"
# If, for example, there is a power failure, the UNIX socket file will be left and
# the error "connect: connection refused" will be displayed, so the best thing to
# do is to delete it before starting NGINX UI.
start_precmd="rm -f /var/db/nginx-ui/nginx-ui.sock"
run_rc_command "$1"