SPECS: cacti-cactid.spec - unfortunately it's not a daemon, run fr...

arekm arekm at pld-linux.org
Tue Oct 11 13:26:44 CEST 2005


Author: arekm                        Date: Tue Oct 11 11:26:44 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- unfortunately it's not a daemon, run from cron

---- Files affected:
SPECS:
   cacti-cactid.spec (1.3 -> 1.4) 

---- Diffs:

================================================================
Index: SPECS/cacti-cactid.spec
diff -u SPECS/cacti-cactid.spec:1.3 SPECS/cacti-cactid.spec:1.4
--- SPECS/cacti-cactid.spec:1.3	Tue Oct 11 13:07:28 2005
+++ SPECS/cacti-cactid.spec	Tue Oct 11 13:26:38 2005
@@ -7,8 +7,6 @@
 Group:		Applications
 Source0:	http://www.cacti.net/downloads/cactid/%{name}-%{version}.tar.gz
 # Source0-md5:	2b102f9029ffaa4fb0e186c6640b1851
-Source1:	%{name}.init
-Source2:	%{name}.sysconfig
 URL:		http://www.cacti.net/
 BuildRequires:	automake
 BuildRequires:	mysql-devel
@@ -34,42 +32,26 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_sysconfdir}/{rc.d/init.d,sysconfig}
+install -d $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/
 
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
 install cactid.conf $RPM_BUILD_ROOT%{_sysconfdir}
-install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/cactid
-install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/cactid
+
+cat  << EOF > $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/%{name}
+*/5 * * * * nobody umask 022; /usr/bin/cactid > /dev/null 2>&1
+EOF
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post
-/sbin/chkconfig --add cactid
-if [ -f /var/lock/subsys/cactid ]; then
-        /etc/rc.d/init.d/cactid restart 1>&2
-else
-        echo "Run \"/etc/rc.d/init.d/cactid start\" to start cactid daemon."
-fi
-
-%preun
-if [ "$1" = "0" ]; then
-        if [ -f /var/lock/subsys/cactid ]; then
-                /etc/rc.d/init.d/cactid stop 1>&2
-        fi
-        /sbin/chkconfig --del cactid
-fi
-
-
 %files
 %defattr(644,root,root,755)
 %doc CHANGELOG README
 %attr(755,root,root) %{_bindir}/*
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cactid.conf
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sysconfig/cactid
-%attr(754,root,root) /etc/rc.d/init.d/cactid
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -77,6 +59,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.4  2005/10/11 11:26:38  arekm
+- unfortunately it's not a daemon, run from cron
+
 Revision 1.3  2005/10/11 11:07:28  arekm
 - fix amd64
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/cacti-cactid.spec?r1=1.3&r2=1.4&f=u




More information about the pld-cvs-commit mailing list