ClamAV And Gui First Release

This commit is contained in:
alick01
2018-12-03 11:47:18 +03:00
parent e054557b66
commit e2315dadb3
11 changed files with 1199 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
#!/usr/bin/python
import os
def postInstall(fromVersion, fromRelease, toVersion, toRelease):
os.system("/bin/chown clamav:clamav /var/lib/clamav -R")
os.system("/bin/chown clamav:clamav /run/clamav -R")
os.system("/bin/chown clamav:clamav /var/log/clamav -R")
+36
View File
@@ -0,0 +1,36 @@
# -*- coding: utf-8 -*-
import os
from comar.service import *
serviceType = "server"
serviceDesc = _({"en": "Clam Anti-Virus Daemon",
"tr": "Clam Antivirüs Servisi"})
@synchronized
def start():
#if config.get("DAZUKO_SUPPORT", "no") == "yes":
# call("System.Service.start", "dazuko")
startService(command="/usr/sbin/clamd",
chuid="clamav",
pidfile="/run/clamav/clamd.pid",
donotify=False)
time.sleep(3)
startService(command="/usr/bin/freshclam",
args="-d -p /run/clamav/freshclam.pid",
chuid="clamav",
pidfile="/run/clamav/freshclam.pid",
donotify=True)
@synchronized
def stop():
stopService(command="/usr/sbin/clamd",
donotify=True)
time.sleep(4)
stopService(command="/usr/bin/freshclam",
donotify=True)
#if config.get("DAZUKO_SUPPORT", "no") == "yes":
# call("System.Service.stop", "dazuko")
def status():
return isServiceRunning("/run/clamav/clamd.pid") and isServiceRunning("/run/clamav/freshclam.pid")