clamav-1.4.2

This commit is contained in:
uglyside
2025-04-19 21:43:18 +03:00
parent 5e3d2f4270
commit 0909366def
9 changed files with 144 additions and 170 deletions
+12 -5
View File
@@ -1,23 +1,30 @@
# -*- coding: utf-8 -*-
#!/usr/bin/env python
#!/usr/bin/python
import os
from comar.service import *
serviceType = "server"
serviceType = "local"
serviceDefault = "off"
serviceConf = "freshclam"
serviceDesc = _({"en": "ClamAV database updater service"})
PIDFILE = "/var/run/freshclam.pid"
@synchronized
def start():
startService(command="/usr/bin/freshclam",
args="-d -p /run/freshclam.pid",
pidfile="/run/freshclam.pid",
args="--config-file=/etc/clamav/freshclam.conf %s" % config.get("CLIOPTS"),
pidfile=PIDFILE,
detach=True,
donotify=True)
@synchronized
def stop():
stopService(command="/usr/bin/freshclam",
pidfile=PIDFILE,
donotify=True)
if os.path.isfile(PIDFILE): os.unlink(PIDFILE)
def status():
return isServiceRunning("/run/freshclam.pid")
return isServiceRunning(PIDFILE)