From 1704837c67e27166bd727239e49c31b307c82985 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Fri, 28 Jan 2005 18:56:16 +0000 Subject: [PATCH] - added chkconfig Changed files: tenshi.spec -> 1.5 --- tenshi.spec | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/tenshi.spec b/tenshi.spec index ecc7dce..e467517 100644 --- a/tenshi.spec +++ b/tenshi.spec @@ -1,9 +1,8 @@ -# TODO: chkconfig Summary: Log parsing and notification program Summary(pl): Program do analizy logów i powiadamiania Name: tenshi Version: 0.3.2 -Release: 0.4 +Release: 0.5 License: GPL Group: Applications/System Source0: http://dev.gentoo.org/~lcars/tenshi/%{name}-%{version}.tar.gz @@ -64,6 +63,22 @@ install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} %clean rm -rf $RPM_BUILD_ROOT +%post +/sbin/chkconfig --add %{name} +if [ -f /var/lock/subsys/%{name} ]; then + /etc/rc.d/init.d/%{name} restart >&2 +else + echo "Run \"/etc/rc.d/init.d/%{name} start\" to start %{name} daemon." +fi + +%preun +if [ "$1" = "0" ]; then + if [ -f /var/lock/subsys/%{name} ]; then + /etc/rc.d/init.d/%{name} stop >&2 + fi + /sbin/chkconfig --del %{name} +fi + %files %defattr(644,root,root,755) %doc README INSTALL CREDITS Changelog -- 2.44.0