sysutils/gol: New port: All-in-one log viewer in browser

gol is a fast and lightweight log viewer that allows you to view
logs in real time from different sources (files, Docker logs, remote
via SSH, piped inputs, etc.) from a web browser.
This commit is contained in:
Jesús Daniel Colmenares Oviedo
2025-11-14 19:56:44 -04:00
parent 72bee06d80
commit 4bb2e36e91
5 changed files with 92 additions and 0 deletions

View File

@@ -476,6 +476,7 @@
SUBDIR += goaccess
SUBDIR += goawk
SUBDIR += gobi_loader
SUBDIR += gol
SUBDIR += gomi
SUBDIR += gomplate
SUBDIR += gonzo

32
sysutils/gol/Makefile Normal file
View File

@@ -0,0 +1,32 @@
PORTNAME= gol
DISTVERSIONPREFIX= v
DISTVERSION= 1.0.35
CATEGORIES= sysutils
MASTER_SITES= LOCAL/dtxdf/${PORTNAME}/
DISTFILES= ${PORTNAME}-${DISTVERSIONPREFIX}${DISTVERSION}.vendor${EXTRACT_SUFX}
MAINTAINER= dtxdf@FreeBSD.org
COMMENT= All-in-one log viewer in browser
WWW= https://github.com/kevincobain2000/${PORTNAME}
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
USES= go:modules
USE_GITHUB= yes
GH_ACCOUNT= kevincobain2000
USE_RC_SUBR= ${PORTNAME}
GO_TARGET= ./frontend/main.go:${PORTNAME}
SUB_LIST= USER=${GOL_USER}
PLIST_FILES= bin/${PORTNAME}
GOL_USER= www
post-extract:
@${MKDIR} ${WRKSRC}/vendor
@cd ${WRKDIR}/${PORTNAME}-vendor && ${COPYTREE_SHARE} . ${WRKSRC}/vendor
.include <bsd.port.mk>

5
sysutils/gol/distinfo Normal file
View File

@@ -0,0 +1,5 @@
TIMESTAMP = 1763156565
SHA256 (gol-v1.0.35.vendor.tar.gz) = a72e691485c92e1775297ecbb47c29337b275c4a3d7a5b204608c9a28dd4982b
SIZE (gol-v1.0.35.vendor.tar.gz) = 4082558
SHA256 (kevincobain2000-gol-v1.0.35_GH0.tar.gz) = 7290bb10db4526274dd8d6fe43a9ae88eda26dff6feaf7148c5dc82935bdedca
SIZE (kevincobain2000-gol-v1.0.35_GH0.tar.gz) = 157006

51
sysutils/gol/files/gol.in Normal file
View File

@@ -0,0 +1,51 @@
#!/bin/sh
# PROVIDE: gol
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Configuration settings for gol in /etc/rc.conf
#
# gol_enable (bool): Enable gol. (default=NO)
# gol_runas (str): User to run gol as. (default=%%USER%%)
# gol_host (str): Host to serve. (default=127.0.0.1)
# gol_port (int): Port to serve. (default=3003)
# gol_every (int): Check for file paths every n seconds. (default=10)
# gol_log (str): Log output. (default=/var/log/gol.log)
# gol_extra_args (str): Additional parameters. (default=-f=${gol_log})
# gol_args (str): Main parameters. (default=-every=${gol_every} -host=${gol_host} -port=${gol_port} ${gol_extra_args})
#
. /etc/rc.subr
name="gol"
desc="All-in-one log viewer in browser"
rcvar="${name}_enable"
load_rc_config $name
: ${gol_enable:="NO"}
: ${gol_runas:="%%USER%%"}
: ${gol_log="/var/log/gol.log"}
: ${gol_extra_args="-f=${gol_log}"}
: ${gol_every:="10"}
: ${gol_host:="127.0.0.1"}
: ${gol_port:="3003"}
: ${gol_args="-every=${gol_every} -host=${gol_host} -port=${gol_port} ${gol_extra_args}"}
command="/usr/sbin/daemon"
pidfile="/var/run/${name}.pid"
procname="/usr/local/bin/${name}"
command_args="-c -u ${gol_runas} -o ${gol_log} -p ${pidfile} -t \"${desc}\" ${procname} -open=false ${gol_args}"
start_precmd="${name}_prestart"
gol_prestart()
{
if [ ! -f "${gol_log}" ]; then
install -m 644 /dev/null "${gol_log}"
fi
chmod 644 "${gol_log}"
}
run_rc_command "$1"

3
sysutils/gol/pkg-descr Normal file
View File

@@ -0,0 +1,3 @@
gol is a fast and lightweight log viewer that allows you to view
logs in real time from different sources (files, Docker logs, remote
via SSH, piped inputs, etc.) from a web browser.