From 3c78eebb60e357d44fdcaa260517d0b2c801c303 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Fri, 24 Feb 2006 15:20:04 +0000 Subject: [PATCH] - use %service Changed files: atsar.spec -> 1.17 --- atsar.spec | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/atsar.spec b/atsar.spec index 00a9bab..07a2cac 100644 --- a/atsar.spec +++ b/atsar.spec @@ -11,8 +11,9 @@ Source1: %{name}.init Source2: %{name}.cron Patch0: %{name}-runfrompath.patch URL: ftp://ftp.atcomputing.nl/pub/tools/linux/ -Requires: rc-scripts +BuildRequires: rpmbuild(macros) >= 1.268 Requires(post,preun): /sbin/chkconfig +Requires: rc-scripts ExclusiveOS: Linux BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) @@ -68,19 +69,12 @@ install atsar_linux.conf $RPM_BUILD_ROOT%{_sysconfdir}/atsar.conf rm -rf $RPM_BUILD_ROOT %post -/usr/bin/atsa1 -/sbin/chkconfig --add atsar -if [ -f /var/lock/subsys/atsar ]; then - /etc/rc.d/init.d/atsar restart 1>&2 -else - echo "Type \"/etc/rc.d/init.d/atsar start\" to start atsar" 1>&2 -fi +%{_bindir}/atsa1 +%service atsar restart %preun if [ "$1" = "0" ]; then - if [ -f /var/lock/subsys/atsar ]; then - /etc/rc.d/init.d/atsar stop - fi + %service atsar stop /sbin/chkconfig --del atsar fi -- 2.43.0