Accepting request 221536 from devel:languages:python
- again fix PIDfile handling for rrdcached in systemd file (ugly now: because of removal of declaration in sysconfig file; it has to be declared twice in service file) - add PIDfile directory using tmpfiles now (forwarded request 221484 from jsjhb) OBS-URL: https://build.opensuse.org/request/show/221536 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rrdtool?expand=0&rev=54
This commit is contained in:
commit
af5ed89f82
@ -14,8 +14,6 @@ test -r $RRDCACHED_CONFIG || { echo "$RRDCACHED_CONFIG not existing";
|
||||
if [ "$1" = "stop" ]; then exit 0;
|
||||
else exit 6; fi; }
|
||||
|
||||
RRDCACHED_PID='/run/rrdcached.pid'
|
||||
|
||||
# Read config
|
||||
. $RRDCACHED_CONFIG
|
||||
|
||||
@ -24,8 +22,6 @@ function check_and_create_dir(){
|
||||
test -d "$DIR" || mkdir -p "$DIR"
|
||||
}
|
||||
|
||||
check_and_create_dir "$(dirname $RRDCACHED_PID)"
|
||||
chown $RRDCACHED_USER:$RRDCACHED_GROUP "$(dirname $RRDCACHED_PID)"
|
||||
case "$RRDCACHED_ADDRESS" in
|
||||
^unix:)
|
||||
SOCKETDIR=$(dirname ${RRDCACHED_ADDRESS/unix:/})
|
||||
|
@ -16,10 +16,10 @@ Type=forking
|
||||
ExecStartPre=-/bin/echo 'Starting RRD data caching service (rrdtools - rrdcached)'
|
||||
ExecStartPre=/bin/sh -c "/usr/share/rrdcached/rrdcached-systemd-pre"
|
||||
EnvironmentFile=-/etc/sysconfig/rrdcached
|
||||
ExecStart=/usr/bin/rrdcached -s $RRDCACHED_GROUP -b "$RRDCACHED_CHROOT_DIR" -p "$RRDCACHED_PID" -l $RRDCACHED_ADDRESS -m $RRDCACHED_SOCKET_MASK -w $RRDCACHED_DISKWRITE -z $RRDCACHED_DELAY -t $RRDCACHED_WRITE_THREADS $RRDCACHED_OPTIONS
|
||||
ExecStart=/usr/bin/rrdcached -s $RRDCACHED_GROUP -b "$RRDCACHED_CHROOT_DIR" -p /run/rrdcached/rrdcached.pid -l $RRDCACHED_ADDRESS -m $RRDCACHED_SOCKET_MASK -w $RRDCACHED_DISKWRITE -z $RRDCACHED_DELAY -t $RRDCACHED_WRITE_THREADS $RRDCACHED_OPTIONS
|
||||
Restart=always
|
||||
RestartSec=1
|
||||
PIDFile=/run/rrdcached.pid
|
||||
PIDFile=/run/rrdcached/rrdcached.pid
|
||||
TimeoutStopSec=10
|
||||
|
||||
[Install]
|
||||
|
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Feb 9 08:58:51 UTC 2014 - obs@botter.cc
|
||||
|
||||
- again fix PIDfile handling for rrdcached in systemd file
|
||||
(ugly now: because of removal of declaration in sysconfig file;
|
||||
it has to be declared twice in service file)
|
||||
- add PIDfile directory using tmpfiles now
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 13 08:42:10 UTC 2014 - coolo@suse.com
|
||||
|
||||
|
10
rrdtool.spec
10
rrdtool.spec
@ -16,6 +16,8 @@
|
||||
#
|
||||
|
||||
|
||||
%{!?_tmpfilesdir:%global _tmpfilesdir /usr/lib/tmpfiles.d}
|
||||
|
||||
Name: rrdtool
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
@ -243,7 +245,9 @@ install -Dm644 %{SOURCE2} %{buildroot}%{_localstatedir}/adm/fillup-templates/sys
|
||||
# install systemd specific files
|
||||
install -Dm755 %{SOURCE4} %{buildroot}%{_datadir}/rrdcached/rrdcached-systemd-pre
|
||||
install -Dm644 %{SOURCE5} %{buildroot}%{_unitdir}/rrdcached.service
|
||||
mkdir -p %{buildroot}%{_localstatedir}/lib/rrdtool/rrdcached
|
||||
install -d -m 0755 %{buildroot}/%{_tmpfilesdir}
|
||||
echo "d /run/rrdcached 0755 %{rrdcached_user} %{rrdcached_group}" > %{buildroot}/%{_tmpfilesdir}/rrdcached.conf
|
||||
chmod 644 %{buildroot}/%{_tmpfilesdir}/rrdcached.conf
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
|
||||
@ -296,11 +300,10 @@ mkdir -p %{buildroot}%{_localstatedir}/lib/rrdtool/rrdcached
|
||||
%defattr(-, root, root)
|
||||
%{_bindir}/rrdcached
|
||||
%{_localstatedir}/adm/fillup-templates/sysconfig.rrdcached
|
||||
%dir %{_localstatedir}/lib/rrdtool
|
||||
%attr(-,%rrdcached_user,%rrdcached_group) %dir %{_localstatedir}/lib/rrdtool/rrdcached
|
||||
%{_datadir}/rrdcached
|
||||
%{_datadir}/rrdcached/rrdcached-systemd-pre
|
||||
%{_unitdir}/rrdcached.service
|
||||
%{_tmpfilesdir}/rrdcached.conf
|
||||
|
||||
%pre cached
|
||||
getent group %rrdcached_group >/dev/null || groupadd %rrdcached_group
|
||||
@ -310,6 +313,7 @@ getent passwd %rrdcached_user >/dev/null || useradd -s /sbin/nologin -g %rrdcach
|
||||
%post cached
|
||||
%service_add_post rrdcached.service
|
||||
%fillup_only rrdcached
|
||||
systemd-tmpfiles --create %{_tmpfilesdir}/rrdcached.conf
|
||||
|
||||
%preun cached
|
||||
%service_del_preun rrdcached.service
|
||||
|
Loading…
Reference in New Issue
Block a user