databases/rrdtool: Don't hardcode in start script
Upate the start script of the rrdtool component rrdcached to not hardcode things like group, socket and pid. These can now be overridden in /etc/rc.conf with rrdcached_group, rrdcached_address and rrdcached_pid, respectively. The defaults are still the same. PR: 246122 Submitted by: Dries Michiels MFH: 2020Q3
This commit is contained in:
parent
d444a1556f
commit
f04dbbe034
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=542669
@ -3,7 +3,7 @@
|
||||
|
||||
PORTNAME= rrdtool
|
||||
PORTVERSION= 1.7.2
|
||||
PORTREVISION= 3
|
||||
PORTREVISION= 4
|
||||
CATEGORIES= databases graphics
|
||||
MASTER_SITES= http://oss.oetiker.ch/rrdtool/pub/
|
||||
|
||||
|
@ -10,9 +10,14 @@
|
||||
#
|
||||
# rrdcached_enable (bool): Set to "NO" by default.
|
||||
# Set to "YES" to enable rrdcached
|
||||
#
|
||||
# rrdcached_flags (str): Set to "" by default.
|
||||
#
|
||||
# rrdcached_address (string): Socket or IP address to listen to
|
||||
# Default: socket /var/run/rrdcached.sock
|
||||
# rrdcached_group (string): Group owner of the socket
|
||||
# Default: www
|
||||
# rrdcached_pid (string): PID file location
|
||||
# Default: /var/run/rrdcached.pid
|
||||
# rrdcached_flags (string): Arguments appended to command_args
|
||||
# Default: ""
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
@ -23,9 +28,12 @@ load_rc_config $name
|
||||
|
||||
# Set defaults
|
||||
: ${rrdcached_enable="NO"}
|
||||
: ${rrdcached_flags="-s www -l /var/run/rrdcached.sock -p /var/run/rrdcached.pid"}
|
||||
: ${rrdcached_address="/var/run/rrdcached.sock"}
|
||||
: ${rrdcached_group="www"}
|
||||
: ${rrdcached_pid="/var/run/rrdcached.pid"}
|
||||
|
||||
pidfile=/var/run/${name}.pid
|
||||
command=%%PREFIX%%/bin/${name}
|
||||
command_args="-s $rrdcached_group -l $rrdcached_address -p $rrdcached_pid"
|
||||
|
||||
run_rc_command "$1"
|
||||
|
Loading…
Reference in New Issue
Block a user