clamav-1.0.0.

This commit is contained in:
4fury-c3440d8
2022-12-29 01:44:39 +03:00
parent 56eb91c18e
commit 57a40e0a8d
7 changed files with 99 additions and 44 deletions
+24
View File
@@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
#!/usr/bin/env python
import os
from comar.service import *
serviceType = "server"
serviceDesc = _({"en": "Clam Anti-Virus Daemon",
"tr": "Clam Antivirüs Servisi"})
@synchronized
def start():
startService(command="/usr/sbin/clamd",
pidfile="/run/clamd.pid",
donotify=False)
time.sleep(4)
@synchronized
def stop():
stopService(command="/usr/sbin/clamd",
donotify=True)
def status():
return isServiceRunning("/run/clamd.pid")
+23
View File
@@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
#!/usr/bin/env python
import os
from comar.service import *
serviceType = "server"
serviceDesc = _({"en": "ClamAV database updater service"})
@synchronized
def start():
startService(command="/usr/bin/freshclam",
args="-d -p /run/freshclam.pid",
pidfile="/run/freshclam.pid",
donotify=True)
@synchronized
def stop():
stopService(command="/usr/bin/freshclam",
donotify=True)
def status():
return isServiceRunning("/run/freshclam.pid")
+1 -1
View File
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
import os
-32
View File
@@ -1,32 +0,0 @@
# -*- 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():
startService(command="/usr/sbin/clamd",
#chuid="clamav",
pidfile="/run/clamd.pid",
donotify=False)
time.sleep(3)
startService(command="/usr/bin/freshclam",
args="-d -p /run/freshclam.pid",
#chuid="clamav",
pidfile="/run/freshclam.pid",
donotify=True)
@synchronized
def stop():
stopService(command="/usr/sbin/clamd",
donotify=True)
time.sleep(4)
stopService(command="/usr/bin/freshclam",
donotify=True)
def status():
return isServiceRunning("/run/clamd.pid") and isServiceRunning("/run/freshclam.pid")