소스 검색

Implement features in #202, with exception to (non existent) exim config files

Michael Schloh von Bennewitz 22 년 전
부모
커밋
accc337dfb
3개의 변경된 파일22개의 추가작업 그리고 4개의 파일을 삭제
  1. 17 3
      exim/exim.spec
  2. 1 1
      exim/fsl.exim
  3. 4 0
      exim/rc.exim

+ 17 - 3
exim/exim.spec

@@ -35,7 +35,7 @@ Distribution: OpenPKG [JUNK]
 Group:        Mail
 License:      GPL
 Version:      4.24
-Release:      20030923
+Release:      20031021
 
 #   package options
 %option       with_fsl  yes
@@ -54,8 +54,8 @@ PreReq:       OpenPKG, openpkg >= 20030909, perl, gzip
 BuildPreReq:  openssl, db >= 4.1.24, libiconv
 PreReq:       openssl, db >= 4.1.24, libiconv
 %if "%{with_fsl}" == "yes"
-BuildPreReq:  fsl >= 1.2.0
-PreReq:       fsl >= 1.2.0
+BuildPreReq:  fsl >= 1.3.0
+PreReq:       fsl >= 1.3.0
 %endif
 AutoReq:      no
 AutoReqProv:  no
@@ -187,3 +187,17 @@ Conflicts:    postfix, sendmail, ssmtp
 %clean
     rm -rf $RPM_BUILD_ROOT
 
+%post
+    #   after upgrade, restart service
+    [ $1 -eq 2 ] || exit 0
+    eval `%{l_rc} exim status 2>/dev/null`
+    [ ".$exim_active" = .yes ] && %{l_rc} exim restart
+    exit 0
+
+%preun
+    #   before erase, stop service and remove log files
+    [ $1 -eq 0 ] || exit 0
+    %{l_rc} exim stop 2>/dev/null
+    rm -f $RPM_INSTALL_PREFIX/var/exim/* >/dev/null 2>&1 || true
+    exit 0
+

+ 1 - 1
exim/fsl.exim

@@ -9,7 +9,7 @@ ident (.+)/mail q{
     -> {
         debug: file(
             path="@l_prefix@/var/exim/exim.log",
-            perm=0644
+            perm=0644, monitor=3600
         )
     }
 };

+ 4 - 0
exim/rc.exim

@@ -37,20 +37,24 @@
 
 %start -u @l_susr@
     rcService exim enable yes || exit 0
+    rcService exim active yes && exit 0
     @l_prefix@/bin/exim ${exim_flags}
 
 %stop -u @l_susr@
     rcService exim enable yes || exit 0
+    rcService exim active no && exit 0
     exim_signal TERM
 
 %restart -u @l_susr@
     rcService exim enable yes || exit 0
+    rcService exim active no && exit 0
     exim_signal TERM
     sleep 1
     @l_prefix@/bin/exim ${exim_flags}
 
 %reload -u @l_susr@
     rcService exim enable yes || exit 0
+    rcService exim active no && exit 0
     exim_signal HUP
 
 %daily -u @l_susr@