diff --git a/rrdcached-systemd-pre b/rrdcached-systemd-pre index 46541b0..fbec76a 100644 --- a/rrdcached-systemd-pre +++ b/rrdcached-systemd-pre @@ -14,7 +14,7 @@ test -r $RRDCACHED_CONFIG || { echo "$RRDCACHED_CONFIG not existing"; if [ "$1" = "stop" ]; then exit 0; else exit 6; fi; } -RRDCACHED_PID='/var/lib/rrdtool/rrdcached/rrdcached.pid' +RRDCACHED_PID='/run/rrdcached.pid' # Read config . $RRDCACHED_CONFIG diff --git a/rrdcached.service b/rrdcached.service index 6257ca5..02a3eba 100644 --- a/rrdcached.service +++ b/rrdcached.service @@ -12,13 +12,14 @@ Wants=network.target After=network.target [Service] +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 Restart=always RestartSec=1 -PIDFile="$RRDCACHED_PID" +PIDFile=/run/rrdcached.pid TimeoutStopSec=10 [Install] diff --git a/rrdtool.changes b/rrdtool.changes index ebfebe3..bd27e8e 100644 --- a/rrdtool.changes +++ b/rrdtool.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Fri Oct 4 17:01:23 UTC 2013 - p.drouand@gmail.com + +- Remove PIDfile definition of sysconfig file and add it in systemd + service file +- Fix PIDfile location to /run instead of var/lib/rccached + +------------------------------------------------------------------- +Fri Oct 4 10:40:05 UTC 2013 - obs@botter.cc + +- fix rrdcached service file (type=forking), add pid file variable + ------------------------------------------------------------------- Thu Oct 3 14:41:37 UTC 2013 - p.drouand@gmail.com diff --git a/rrdtool.spec b/rrdtool.spec index 8e9062c..ae33a62 100644 --- a/rrdtool.spec +++ b/rrdtool.spec @@ -17,25 +17,25 @@ Name: rrdtool +BuildRequires: autoconf +BuildRequires: automake BuildRequires: cairo-devel BuildRequires: freetype2-devel +BuildRequires: gettext-tools BuildRequires: glib2-devel BuildRequires: groff BuildRequires: intltool BuildRequires: libart_lgpl-devel BuildRequires: libpng-devel +BuildRequires: libtool BuildRequires: libxml2-devel +BuildRequires: lua51-devel BuildRequires: pango-devel BuildRequires: python-devel -BuildRequires: tcl-devel -BuildRequires: gettext-tools BuildRequires: ruby-devel -BuildRequires: lua51-devel -BuildRequires: autoconf -BuildRequires: automake -BuildRequires: libtool -BuildRequires: tcpd-devel BuildRequires: systemd +BuildRequires: tcl-devel +BuildRequires: tcpd-devel Requires: perl = %{perl_version} Version: 1.4.7 Release: 0 @@ -241,7 +241,6 @@ install -Dm755 %{SOURCE4} %{buildroot}%{_datadir}/rrdcached/rrdcached-systemd-pr install -Dm644 %{SOURCE5} %{buildroot}%{_unitdir}/rrdcached.service mkdir -p %{buildroot}%{_localstatedir}/lib/rrdtool/rrdcached - %post -p /sbin/ldconfig %postun -p /sbin/ldconfig diff --git a/sysconfig.rrdcached b/sysconfig.rrdcached index 0de1375..1d61ed9 100644 --- a/sysconfig.rrdcached +++ b/sysconfig.rrdcached @@ -102,3 +102,4 @@ RRDCACHED_CHROOT_DIR="/tmp" # Other options - see man 1 rrdcached # RRDCACHED_OPTIONS="" +