git: 0dfc5a94ecfc - main - net-mgmt/semaphore: Write rc script output to a log file
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 03 Oct 2026 11:21:17 UTC
The branch main has been updated by joneum:
URL: https://cgit.FreeBSD.org/ports/commit/?id=0dfc5a94ecfc2cf61a7cdc19b6249a942eeeef76
commit 0dfc5a94ecfc2cf61a7cdc19b6249a942eeeef76
Author: Jochen Neumeister <joneum@FreeBSD.org>
AuthorDate: 2026-10-03 11:19:11 +0000
Commit: Jochen Neumeister <joneum@FreeBSD.org>
CommitDate: 2026-10-03 11:20:39 +0000
net-mgmt/semaphore: Write rc script output to a log file
Redirect stdout and stderr of the service to /var/log/semaphore.log.
The path can be changed with semaphore_logfile in rc.conf.
PR: 298453
Approved by: egypcio (maintainer timeout)
Sponsored by: Netzkommune GmbH
---
net-mgmt/semaphore/Makefile | 2 +-
net-mgmt/semaphore/files/semaphore.in | 7 ++++++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/net-mgmt/semaphore/Makefile b/net-mgmt/semaphore/Makefile
index 67bdb8024f4e..c743aae767f7 100644
--- a/net-mgmt/semaphore/Makefile
+++ b/net-mgmt/semaphore/Makefile
@@ -1,7 +1,7 @@
PORTNAME= semaphore
DISTVERSIONPREFIX= v
DISTVERSION= 2.19.7
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= net-mgmt
MASTER_SITES+= https://github.com/joneum/FreeBSD-Semaphore/releases/download/${PORTNAME}-${DISTVERSION}/:webui
DISTFILES+= ${PORTNAME}-webui-${DISTVERSION}${EXTRACT_SUFX}:webui \
diff --git a/net-mgmt/semaphore/files/semaphore.in b/net-mgmt/semaphore/files/semaphore.in
index 70b0e159baba..02a9f26186f5 100644
--- a/net-mgmt/semaphore/files/semaphore.in
+++ b/net-mgmt/semaphore/files/semaphore.in
@@ -3,6 +3,10 @@
# PROVIDE: semaphore
# REQUIRE: LOGIN
# KEYWORD: shutdown
+#
+# semaphore_enable (bool): Set to NO by default.
+# semaphore_config (str): Configuration file to use.
+# semaphore_logfile (str): File to write stdout and stderr to.
. /etc/rc.subr
@@ -13,12 +17,13 @@ load_rc_config ${name}
: ${semaphore_enable:="NO"}
: ${semaphore_config="%%PREFIX%%/etc/semaphore/config.json"}
+: ${semaphore_logfile="/var/log/${name}.log"}
export PATH=${PATH}:%%PREFIX%%/bin
pidfile="/var/run/${name}.pid"
procname="%%PREFIX%%/bin/semaphore"
command="/usr/sbin/daemon"
-command_args="-f -c -p ${pidfile} /usr/bin/env ${semaphore_env} ${procname} server --config \"${semaphore_config}\""
+command_args="-f -c -o ${semaphore_logfile} -p ${pidfile} /usr/bin/env ${semaphore_env} ${procname} server --config \"${semaphore_config}\""
run_rc_command "$1"