service.py 690 B

12345678910111213141516171819202122232425262728
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. from comar.service import *
  4. serviceType = "server"
  5. serviceDesc = _({"en": "Icecast Daemon",
  6. "tr": "Icecast Servisi"})
  7. @synchronized
  8. def start():
  9. startService(command="/usr/bin/icecast",
  10. args="-c /etc/icecast/icecast.xml",
  11. pidfile="/run/icecast/icecast.pid",
  12. donotify=True,
  13. detach=True)
  14. @synchronized
  15. def stop():
  16. stopService(pidfile="/run/icecast/icecast.pid",
  17. donotify=True)
  18. def status():
  19. return isServiceRunning("/run/icecast/icecast.pid")
  20. def reload():
  21. stopService(command="/usr/bin/icecast",
  22. args="reload")