diff options
Diffstat (limited to 'net-analyzer/rrdtool/files')
-rw-r--r-- | net-analyzer/rrdtool/files/rrdcached.confd-r1 | 13 | ||||
-rw-r--r-- | net-analyzer/rrdtool/files/rrdcached.init-r1 | 23 |
2 files changed, 36 insertions, 0 deletions
diff --git a/net-analyzer/rrdtool/files/rrdcached.confd-r1 b/net-analyzer/rrdtool/files/rrdcached.confd-r1 new file mode 100644 index 000000000000..99213acd1e1b --- /dev/null +++ b/net-analyzer/rrdtool/files/rrdcached.confd-r1 @@ -0,0 +1,13 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# Default user and group for the rrdcached daemon +GROUP="rrdcached" +USER="root" + +# Default options for the rrdcached daemon +RRCACHE_ARGS="-B -F -m 770 -s rrdcached -l unix:/run/rrdcached.sock" + +# Default path for database and journal +RRCACHE_DATABASE="/var/lib/rrdcached/db" +RRCACHE_JOURNAL="/var/lib/rrdcached/journal" diff --git a/net-analyzer/rrdtool/files/rrdcached.init-r1 b/net-analyzer/rrdtool/files/rrdcached.init-r1 new file mode 100644 index 000000000000..44ee3c5f19df --- /dev/null +++ b/net-analyzer/rrdtool/files/rrdcached.init-r1 @@ -0,0 +1,23 @@ +#!/sbin/openrc-run +# Copyright 1999-2022 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +description="Data caching daemon for RRDTool" +rrdcached_database="${RRCACHE_DATABASE:-/var/lib/rrdcached/db}" +rrdcached_group="${GROUP:-rrdcached}" +rrdcached_journal="${RRCACHE_JOURNAL:-/var/lib/rrdcached/journal}" +rrdcached_user="${USER:-rrdcached}" +pidfile="/run/rrdcached.pid" + +command="/usr/bin/rrdcached" +command_args="${RRCACHE_ARGS} -b ${rrdcached_database} -G ${rrdcached_group} -j ${rrdcached_journal} -p ${pidfile} -U ${rrdcached_user}" + +depend() { + need localmount + use logger +} + +start_pre() { + checkpath -d -o "${rrdcached_user}:${rrdcached_group}" -q "${rrdcached_database}" + checkpath -d -o "${rrdcached_user}:${rrdcached_group}" -q "${rrdcached_journal}" +} |