service.py 557 B

1234567891011121314151617181920212223
  1. # -*- coding: utf-8 -*-
  2. serviceType = "server"
  3. serviceDesc = _({"en": "RSync Daemon",
  4. "tr": "RSync Servisi"})
  5. serviceConf = "rsyncd"
  6. from comar.service import *
  7. @synchronized
  8. def start():
  9. startService(command="/usr/bin/rsync",
  10. args="--daemon %s" % config.get("RSYNC_OPTS", ""),
  11. pidfile="/run/rsyncd.pid",
  12. donotify=True)
  13. @synchronized
  14. def stop():
  15. stopService(pidfile="/run/rsyncd.pid",
  16. donotify=True)
  17. def status():
  18. return isServiceRunning("/run/rsyncd.pid")