service.py 664 B

123456789101112131415161718192021222324252627
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. serviceType="server"
  4. serviceDesc = _({"en": "Firebird Database Server",
  5. "tr": "Firebird Veritabanı Sunucusu"})
  6. from comar.service import *
  7. pid_file = "/run/firebird/firebird.pid"
  8. @synchronized
  9. def start():
  10. startService(command="/opt/firebird/bin/fbguard",
  11. args="-pidfile %s -start -forever -daemon" % pid_file,
  12. pidfile="/run/firebird/firebird.pid",
  13. donotify=True)
  14. # chuid="firebird",
  15. @synchronized
  16. def stop():
  17. stopService(pidfile=pid_file,
  18. donotify=True)
  19. def status():
  20. return isServiceRunning(pid_file)