spamassassin.

This commit is contained in:
4fury-c3440d8
2021-10-14 06:12:46 +03:00
parent ea67d544a2
commit 4e5a883d49
5 changed files with 162 additions and 0 deletions
@@ -0,0 +1,9 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os
def postInstall(fromVersion, fromRelease, toVersion, toRelease):
os.system("sa-update")
os.system("/bin/chmod 755 /var/lib/spamd")
os.system("/bin/chown spamd: /var/lib/spamd -R")
@@ -0,0 +1,27 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
from comar.service import *
serviceType = "server"
serviceDesc = _({"en": "Spam detection daemon",
"tr": "Spam algılama servisi"})
serviceDefault="on"
serviceConf = "spamd"
@synchronized
def start():
startService(command="/usr/bin/spamd",
args="-d -r %s %s %s" % (config.get("PIDFILE", "/run/spamd.pid"), config.get("PARAMS", ""), config.get("EXTRA", "")),
nice = int(config.get("NICELEVEL", "-0")),
donotify=True)
@synchronized
def stop():
stopService(config.get("PIDFILE", "/run/spamd.pid"),
donotify=True)
def status():
return isServiceRunning(config.get("PIDFILE", "/run/spamd.pid"))