service.py 577 B

123456789101112131415161718192021222324252627282930
  1. from comar.service import *
  2. import os
  3. serviceType = "local"
  4. serviceDesc = _({
  5. "en": "Color Management Daemon",
  6. "tr": "Renk Yönetimi Servisi",
  7. })
  8. serviceDefault = "on"
  9. pidFile = "/run/colord.pid"
  10. @synchronized
  11. def start():
  12. startService(command="/usr/libexec/colord",
  13. pidfile=pidFile,
  14. makepid=True,
  15. detach=True,
  16. donotify=True)
  17. @synchronized
  18. def stop():
  19. stopService(pidfile=pidFile,
  20. donotify=True)
  21. os.unlink(pidFile)
  22. def status():
  23. return isServiceRunning(pidFile)