From: Marcin Krol Date: Wed, 8 Mar 2023 21:11:10 +0000 (+0100) Subject: - allow to define user/group for process and UNIX socket X-Git-Url: https://git.tld-linux.org/?a=commitdiff_plain;h=bc6d126903fad6ec1ee14db7ec17dd41f8ab0233;p=packages%2Frrdtool.git - allow to define user/group for process and UNIX socket --- diff --git a/rrdcached.init b/rrdcached.init index a444438..f16265a 100644 --- a/rrdcached.init +++ b/rrdcached.init @@ -13,6 +13,9 @@ [ -f /etc/sysconfig/rrdcached ] && . /etc/sysconfig/rrdcached # Set defaults if not defined in service config file +RRDCACHED_USER=${RRDCACHED_USER:-rrdcached} +RRDCACHED_GROUP=${RRDCACHED_GROUP:-rrdcached} +RRDCACHED_SOCKET_GROUP=${RRDCACHED_SOCKET_GROUP:-rrdcached} RRDCACHED_WRITE_TIMEOUT=${RRDCACHED_WRITE_TIMEOUT:-300} RRDCACHED_WRITE_DELAY=${RRDCACHED_WRITE_DELAY:-180} RRDCACHED_WRITE_THREADS=${RRDCACHED_WRITE_THREADS:-4} @@ -25,7 +28,7 @@ start() { fi msg_starting "rrdcached" - daemon /usr/bin/rrdcached -U rrdcached -G rrdcached -s rrdcached -m 0660 -w ${RRDCACHED_WRITE_TIMEOUT} -z ${RRDCACHED_WRITE_DELAY} -t ${RRDCACHED_WRITE_THREADS} + daemon /usr/bin/rrdcached -U ${RRDCACHED_USER} -G ${RRDCACHED_GROUP} -s ${RRDCACHED_SOCKET_GROUP} -m 0660 -w ${RRDCACHED_WRITE_TIMEOUT} -z ${RRDCACHED_WRITE_DELAY} -t ${RRDCACHED_WRITE_THREADS} RETVAL=$? [ $RETVAL -eq 0 ] && touch /var/lock/subsys/rrdcached } diff --git a/rrdcached.sysconfig b/rrdcached.sysconfig index a359b53..3abd298 100644 --- a/rrdcached.sysconfig +++ b/rrdcached.sysconfig @@ -1,3 +1,10 @@ +# User and group that daemon will run under +#RRDCACHED_USER="rrdcached" +#RRDCACHED_GROUP="rrdcached" + +# Group for socket file +#RRDCACHED_SOCKET_GROUP="rrdcached" + # Write interval in seconds #RRDCACHED_WRITE_TIMEOUT=300 diff --git a/rrdtool.spec b/rrdtool.spec index 2648ea6..284f00e 100644 --- a/rrdtool.spec +++ b/rrdtool.spec @@ -28,7 +28,7 @@ Summary(ru.UTF-8): RRDtool - база данных с "циклическим о Summary(uk.UTF-8): RRDtool - це система зберігання та показу серійних даних Name: rrdtool Version: 1.8.0 -Release: 1 +Release: 2 License: GPL v2+ + FLOSS exception Group: Applications/Databases Source0: https://github.com/oetiker/rrdtool-1.x/releases/download/v%{version}/%{name}-%{version}.tar.gz