service.py 631 B

123456789101112131415161718192021222324252627
  1. # -*- coding: utf-8 -*-
  2. from comar.service import *
  3. serviceType = "server"
  4. serviceDesc = _({"en": "Cyrus-SASL Daemon",
  5. "tr": "Cyrus-SASL Servisi"})
  6. serviceConf = "saslauthd"
  7. SOCKETDIR = "/run/saslauthd"
  8. PIDFILE = "/run/saslauthd/saslauthd.pid"
  9. @synchronized
  10. def start():
  11. startService(command="/usr/sbin/saslauthd",
  12. args="-m %s %s" % (SOCKETDIR, config.get("SASLAUTHD_OPTS", "")),
  13. pidfile=PIDFILE,
  14. donotify=True)
  15. @synchronized
  16. def stop():
  17. stopService(pidfile=PIDFILE,
  18. donotify=True)
  19. def status():
  20. return isServiceRunning(PIDFILE)