Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Feb 2023 14:22:53 GMT
From:      Dan Langille <dvl@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 52a84b5635bb - main - net-mgmt/icingaweb2-module-vspheredb: allow flags in rc.d script
Message-ID:  <202302171422.31HEMrqN026262@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by dvl:

URL: https://cgit.FreeBSD.org/ports/commit/?id=52a84b5635bb75676ed83ffdaf04cf3023705e24

commit 52a84b5635bb75676ed83ffdaf04cf3023705e24
Author:     Dan Langille <dvl@FreeBSD.org>
AuthorDate: 2023-02-17 14:20:16 +0000
Commit:     Dan Langille <dvl@FreeBSD.org>
CommitDate: 2023-02-17 14:22:50 +0000

    net-mgmt/icingaweb2-module-vspheredb: allow flags in rc.d script
    
    Add vspheredb_flags to rc.d script allowing users to choose which
    daemon(8) they wish to use. My use case is:
    
      vspheredb_flags="-o /var/log/vspheredb.log"
    
    Which logs the output of the daemon to the specified file.
    
    See man(8) daemon for more information.
    
    Approved by:    maintainer (via private communication)
---
 net-mgmt/icingaweb2-module-vspheredb/Makefile           |  2 +-
 net-mgmt/icingaweb2-module-vspheredb/files/vspheredb.in | 10 +++++++---
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/net-mgmt/icingaweb2-module-vspheredb/Makefile b/net-mgmt/icingaweb2-module-vspheredb/Makefile
index 552b4064b023..38ba5772b43f 100644
--- a/net-mgmt/icingaweb2-module-vspheredb/Makefile
+++ b/net-mgmt/icingaweb2-module-vspheredb/Makefile
@@ -1,7 +1,7 @@
 PORTNAME=	icingaweb2-module-vspheredb
 DISTVERSIONPREFIX=	v
 DISTVERSION=	1.4.0
-PORTREVISION=	2
+PORTREVISION=	1
 CATEGORIES=	net-mgmt www
 PKGNAMESUFFIX=	${PHP_PKGNAMESUFFIX}
 
diff --git a/net-mgmt/icingaweb2-module-vspheredb/files/vspheredb.in b/net-mgmt/icingaweb2-module-vspheredb/files/vspheredb.in
index 0e122458400b..83b8228b1963 100755
--- a/net-mgmt/icingaweb2-module-vspheredb/files/vspheredb.in
+++ b/net-mgmt/icingaweb2-module-vspheredb/files/vspheredb.in
@@ -5,10 +5,12 @@
 # BEFORE: LOGIN
 # KEYWORD: shutdown
 #
-# Add the following lines to /etc/rc.conf to enable nsca:
+# Add the following lines to /etc/rc.conf to enable vspheredb:
 # vspheredb (bool):    Set to "NO" by default.
 #                      Set it to "YES" to enable .
 #
+# vspheredb_flags (string): defaults to -f
+# see man(8) daemon for more information
 
 . /etc/rc.subr
 
@@ -17,8 +19,10 @@ rcvar=vspheredb_enable
 
 pidfile="/var/run/vspheredb.pid"
 command="/usr/sbin/daemon"
-command_args="-f -P ${pidfile} %%PREFIX%%/bin/icingacli vspheredb daemon run"
-
 load_rc_config "${name}"
 
+: ${vspheredb_flags:="-f"}
+
+command_args="${vspheredb_flags} -P ${pidfile} /usr/local/bin/icingacli vspheredb daemon run"
+
 run_rc_command "$1"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202302171422.31HEMrqN026262>