]> TLD Linux GIT Repositories - packages/rrdtool.git/commitdiff
- allow to define user/group for process and UNIX socket
authorMarcin Krol <hawk@tld-linux.org>
Wed, 8 Mar 2023 21:11:10 +0000 (22:11 +0100)
committerMarcin Krol <hawk@tld-linux.org>
Wed, 8 Mar 2023 21:11:10 +0000 (22:11 +0100)
rrdcached.init
rrdcached.sysconfig
rrdtool.spec

index a444438126bac6fed1ac5ed3cd0ca95eb39a9c15..f16265af1497b4e03859dac1adbd7f6a98dac26c 100644 (file)
@@ -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
 }
index a359b53b2dafea994e464ea8510a85055ca5f0f9..3abd298480ac7cd6e53b0b6edd76396ce200df77 100644 (file)
@@ -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
 
index 2648ea6549f64bf6f5117922776a1f2b61dfce49..284f00e66096fa68e2f03f0982564ee14501080d 100644 (file)
@@ -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