From d5c71495739fd8e48944df8af92e330974ce60f2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Thu, 2 Mar 2006 23:01:11 +0000 Subject: [PATCH] - use %service and adapterize Changed files: lms.spec -> 1.78 --- lms.spec | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/lms.spec b/lms.spec index ccd0314..c4f368f 100644 --- a/lms.spec +++ b/lms.spec @@ -14,7 +14,6 @@ Name: lms Version: %{lmsver}.%{lmssubver} Release: 1 License: GPL v2 -Vendor: LMS Developers Group: Networking/Utilities Source0: http://lms.rulez.pl/download/%{lmsver}/%{name}-%{version}.tar.gz # Source0-md5: afa0680e112dc14c4fbb41d9ec2eedee @@ -27,6 +26,7 @@ URL: http://lms.rulez.pl/ %{?with_lmsd:BuildRequires: libgadu-devel} %{?with_lmsd:BuildRequires: mysql-devel} %{?with_lmsd:BuildRequires: postgresql-devel} +BuildRequires: rpmbuild(macros) >= 1.268 %{?with_lmsd:Requires(post,preun): /sbin/chkconfig} Requires: Smarty >= 2.6.10-4 Requires: php @@ -213,17 +213,11 @@ rm -rf $RPM_BUILD_ROOT %post lmsd /sbin/chkconfig --add lmsd -if [ -f /var/lock/subsys/lmsd ]; then - /etc/rc.d/init.d/lmsd restart >&2 -else - echo "Run \"/etc/rc.d/init.d/lmsd start\" to start lmsd daemon." -fi +%service lmsd restart "lmsd daemon" %preun lmsd if [ "$1" = "0" ]; then - if [ -f /var/lock/subsys/lmsd ]; then - /etc/rc.d/init.d/lmsd stop >&2 - fi + %service lmsd stop /sbin/chkconfig --del lmsd fi -- 2.44.0