audit:moved into main repo for pisi 2.0

This commit is contained in:
2016-03-21 08:17:48 +02:00
parent f7c32373c4
commit 4d2b7becd3
6 changed files with 199 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os
def postInstall(fromVersion, fromRelease, toVersion, toRelease):
os.system("ln -s /usr/sbin/audispd /sbin/audispd")
os.system("ln -s /usr/sbin/auditd /sbin/auditd")
os.system("/bin/systemctl enable auditd.service")
+24
View File
@@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
from comar.service import *
serviceType = "server"
serviceDesc = _({"en": "AUDIT Daemon",
"tr": "AUDIT Servisi"})
serviceDefault = "on"
@synchronized
def start():
reply = startService(command="/usr/sbin/auditd",
pidfile="/run/auditd.pid",
donotify=True)
if reply == 0:
run("/usr/sbin/auditctl -R /etc/audit/rules.d/audit.rules")
@synchronized
def stop():
stopService(pidfile="/run/auditd.pid",
donotify=True)
run("/usr/sbin/auditctl -D")
def status():
return isServiceRunning("/run/auditd.pid")