SPECS: cacti-cactid.spec - add init scripts

arekm arekm at pld-linux.org
Tue Oct 11 13:05:25 CEST 2005


Author: arekm                        Date: Tue Oct 11 11:05:25 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- add init scripts

---- Files affected:
SPECS:
   cacti-cactid.spec (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: SPECS/cacti-cactid.spec
diff -u SPECS/cacti-cactid.spec:1.1 SPECS/cacti-cactid.spec:1.2
--- SPECS/cacti-cactid.spec:1.1	Tue Oct 11 12:59:20 2005
+++ SPECS/cacti-cactid.spec	Tue Oct 11 13:05:19 2005
@@ -38,15 +38,36 @@
 	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
 
 %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
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -54,6 +75,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.2  2005/10/11 11:05:19  arekm
+- add init scripts
+
 Revision 1.1  2005/10/11 10:59:20  arekm
 - cacti polling daemon
 
================================================================

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




More information about the pld-cvs-commit mailing list