clamav-1.0.0.
This commit is contained in:
@@ -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")
|
||||
@@ -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,4 +1,4 @@
|
||||
#!/usr/bin/python
|
||||
#!/usr/bin/env python
|
||||
|
||||
import os
|
||||
|
||||
|
||||
@@ -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")
|
||||
Reference in New Issue
Block a user