]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
audit: Add systemd service file.
authorStefan Schantl <stefan.schantl@ipfire.org>
Tue, 15 Nov 2011 20:44:15 +0000 (21:44 +0100)
committerStefan Schantl <stefan.schantl@ipfire.org>
Tue, 15 Nov 2011 20:44:15 +0000 (21:44 +0100)
audit/audit.nm
audit/systemd/auditd.service [new file with mode: 0644]

index 3c1336a2c63714116f69b1e2a92394f7babf2662..e51693cba6254863a8d0da3c54419702930ae75f 100644 (file)
@@ -5,7 +5,7 @@
 
 name       = audit
 version    = 2.1.3
-release    = 3
+release    = 4
 
 groups     = System/Daemons
 url        = http://people.redhat.com/sgrubb/audit/
@@ -62,6 +62,26 @@ end
 
 packages
        package %{name}
+
+               prerequires += systemd-units
+
+               script postin
+                       /bin/systemctl daemon-reload >/dev/null 2>&1 || :
+               end
+
+               script preun
+                       /bin/systemctl --no-reload disable auditd.service >/dev/null 2>&1 || :
+                       /bin/systemctl stop auditd.service >/dev/null 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 auditd.service >/dev/null 2>&1 || :
+               end
        end
 
        package %{name}-libs
diff --git a/audit/systemd/auditd.service b/audit/systemd/auditd.service
new file mode 100644 (file)
index 0000000..04b0b36
--- /dev/null
@@ -0,0 +1,11 @@
+[Unit]
+Description=Security Auditing Service
+After=syslog.target
+
+[Service]
+ExecStart=/sbin/auditd -n
+ExecStartPost=/sbin/auditctl -R /etc/audit/audit.rules
+
+[Install]
+WantedBy=multi-user.target
+