service.py 581 B

12345678910111213141516171819202122232425
  1. # -*- coding: utf-8 -*-
  2. from comar.service import *
  3. serviceType = "local"
  4. serviceDesc = _({"en": "System Message Logger",
  5. "tr": "Sistem Günlükleme Hizmeti"})
  6. serviceDefault = "on"
  7. PIDFILE = "/var/run/rsyslogd.pid"
  8. @synchronized
  9. def start():
  10. startService(command="/usr/bin/rsyslogd",
  11. args=config.get("SYSLOGD_OPTIONS", ""),
  12. pidfile=PIDFILE,
  13. detach=True)
  14. @synchronized
  15. def stop():
  16. stopService(pidfile=PIDFILE,
  17. donotify=True)
  18. def status():
  19. return isServiceRunning(pidfile=PIDFILE)