service.py 856 B

123456789101112131415161718192021222324252627282930
  1. from comar.service import *
  2. serviceType = "server"
  3. serviceDesc = _({"en": "GIT Server",
  4. "tr": "GIT Sunucusu"})
  5. serviceDefault = "off"
  6. serviceConf = "git-daemon"
  7. @synchronized
  8. def start():
  9. startService(command="/usr/bin/git",
  10. args="daemon \
  11. --base-path=/pub/scm \
  12. --pid-file=/run/git-daemon.pid \
  13. --user-path=public_git \
  14. --detach \
  15. --export-all \
  16. --syslog \
  17. --verbose %s" % config.get("GITDAEMON_OPTS"),
  18. pidfile="/run/git-daemon.pid",
  19. donotify=True)
  20. @synchronized
  21. def stop():
  22. stopService(pidfile="/run/git-daemon.pid",
  23. donotify=True)
  24. def status():
  25. return isServiceRunning("/run/git-daemon.pid")