clamd.py 537 B

12345678910111213141516171819202122232425
  1. # -*- coding: utf-8 -*-
  2. #!/usr/bin/env python
  3. import os
  4. from comar.service import *
  5. serviceType = "server"
  6. serviceDesc = _({"en": "Clam Anti-Virus Daemon",
  7. "tr": "Clam Antivirüs Servisi"})
  8. @synchronized
  9. def start():
  10. startService(command="/usr/sbin/clamd",
  11. pidfile="/run/clamd.pid",
  12. donotify=False)
  13. time.sleep(4)
  14. @synchronized
  15. def stop():
  16. stopService(command="/usr/sbin/clamd",
  17. donotify=True)
  18. def status():
  19. return isServiceRunning("/run/clamd.pid")