service.py 449 B

12345678910111213141516171819202122
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. serviceType = "server"
  4. serviceDesc = _({"en": "Nginx Web Server",
  5. "tr": "Nginx Web Sunucusu"})
  6. from comar.service import *
  7. @synchronized
  8. def start():
  9. startService(command="/usr/sbin/nginx",
  10. donotify=True)
  11. @synchronized
  12. def stop():
  13. stopService(pidfile="/run/nginx.pid",
  14. donotify=True)
  15. def status():
  16. return isServiceRunning("/run/nginx.pid")