create core package
This commit is contained in:
@@ -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")
|
||||
@@ -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")
|
||||
Reference in New Issue
Block a user