]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blobdiff - rsyslog/rsyslog.nm
Merge remote-tracking branch 'maniacikarus/ids'
[people/ms/ipfire-3.x.git] / rsyslog / rsyslog.nm
index cb19dc454f4772e8e6ae1fccc3e859f625e7b95d..dfe904b32d720db4560f0894272d0208c0a540f7 100644 (file)
@@ -4,8 +4,8 @@
 ###############################################################################
 
 name       = rsyslog
-version    = 5.8.0
-release    = 2
+version    = 5.8.6
+release    = 1
 
 groups     = Base System/Daemons
 url        = http://www.rsyslog.com/
@@ -21,13 +21,8 @@ description
        relay chains.
 end
 
-provides  += syslog
-
 source_dl  = http://www.rsyslog.com/files/download/rsyslog/
 
-CFLAGS    += \
-       -DSYSLOGD_PIDNAME=\"syslogd.pid\"
-
 build
        requires
                gnutls-devel
@@ -36,6 +31,9 @@ build
                zlib-devel
        end
 
+       CFLAGS += \
+               -DSYSLOGD_PIDNAME=\"syslogd.pid\"
+
        configure_options += \
                --exec-prefix= \
                --libdir=/lib \
@@ -69,5 +67,31 @@ end
 packages
        package %{name}
                requires = logrotate
+               provides += syslog
+
+               prerequires = systemd-units
+
+               script postin
+                       for n in /var/log/{messages,secure,maillog,spooler}; do
+                               [ -f "${n}" ] && continue
+                               umask 066 && touch ${n}
+                       done
+
+                       /bin/systemctl enable rsyslog.service >/dev/null 2>&1 || :
+               end
+
+               script preun
+                       /bin/systemctl --no-reload disable rsyslog.service >/dev/null 2>&1 || :
+                       /bin/systemctl stop rsyslog.service 2>&1 || :
+               end
+
+               script postun
+                       /bin/systemctl daemon-reload >/dev/null 2>&1 || :
+               end
+
+               script postup
+                       /bin/systemctl daemon-reload >/dev/null 2>&1 || :
+                       /bin/systemctl try-restart rsyslog.service >/dev/null 2>&1 || :
+               end
        end
 end