]> git.pld-linux.org Git - packages/amavis-stats.git/commitdiff
- release 3 - fixed pre/post to work with apache2 too auto/ac/amavis-stats-0_1_13-0_rc6_3
authorPaweł Gołaszewski <blues@pld-linux.org>
Mon, 27 Sep 2004 20:32:37 +0000 (20:32 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    amavis-stats.spec -> 1.19

amavis-stats.spec

index 1c63ec7e30c8ff716c947d311291e8e8ddd53aae..3f9bbbbbd8028905c9e2ed0620b509b9d95d727d 100644 (file)
@@ -4,7 +4,7 @@ Summary:        Simple amavisd-new statistics generator
 Summary(pl):   Prosty generator statystyk dla amavisd-new
 Name:          amavis-stats
 Version:       0.1.13
-Release:       0.%{_rc}.2
+Release:       0.%{_rc}.3
 License:       GPL
 Group:         Applications/System
 Source0:       http://rekudos.net/download/%{name}-%{version}-%{_rc}.tar.gz
@@ -77,6 +77,8 @@ rm -rf $RPM_BUILD_ROOT
 %post php
 if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*/etc/%{name}/apache.conf" /etc/httpd/httpd.conf; then
        echo "Include /etc/%{name}/apache.conf" >> /etc/httpd/httpd.conf
+elif [ -d /etc/httpd/httpd.conf ]; then
+       ln -sf /etc/%{name}/apache.conf /etc/httpd/httpd.conf/99_%{name}.conf
 fi
 if [ -f /var/lock/subsys/httpd ]; then
        /usr/sbin/apachectl restart 1>&2
@@ -85,9 +87,14 @@ fi
 %preun php
 if [ "$1" = "0" ]; then
        umask 027
-       grep -v "^Include.*/etc/%{name}/apache.conf" /etc/httpd/httpd.conf > \
-               etc/httpd/httpd.conf.tmp
-       mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
+       if [ -d /etc/httpd/httpd.conf ]; then
+               rm -f /etc/httpd/httpd.conf/99_%{name}.conf
+       else
+               grep -v "^Include.*/etc/%{name}/apache.conf" /etc/httpd/httpd.conf > \
+                       /etc/httpd/httpd.conf.tmp
+               mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
+       fi
+
        if [ -f /var/lock/subsys/httpd ]; then
                /usr/sbin/apachectl restart 1>&2
        fi
This page took 0.0866 seconds and 4 git commands to generate.