A simple pure-Go Linux init system.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SERVICES.md 1.4 KiB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. TODO: Full update of this file, currently outdated
  2. # /etc/lutrainit/lutra.d/
  3. ## foo.service
  4. Name: ServiceFoo
  5. Description: Service Foo does lot of things and provides 'foo'
  6. Type: forking
  7. PIDFile: /var/run/foo.pid
  8. Startup: start_foo.bar
  9. Shutdown: stop_foo.bar
  10. ## baz.service
  11. Name: ServiceBaz
  12. Description: Baz runs after Foo and then needs 'foobar'
  13. Type: simple
  14. Requires: foobar
  15. Startup: baz --start
  16. Shutdown: killall baz
  17. # Explanations
  18. ## Service
  19. - Name: name of the service, a-Z0-9 without spaces, - and _ allowed
  20. - Description: One line description of the service
  21. - Relations
  22. - Requires: bar,other
  23. Separate multiples keywords with `,`. Only a-Z0-9 - and _ allowed
  24. - Startup: One line command to start service
  25. - Shutdown: One line command to stop service
  26. - CheckAlive: One line command to check if service is alive, however it use PIDFile
  27. - PIDFile: File the daemon store his PID. Should be mandatory for Type: forking
  28. - Autostart: true/false, will the service started on boot ?
  29. - Type:
  30. - forking: service is expected to fork by himself, PIDFile: would be great
  31. - oneshot: expected to fork by himself, no stop/status possible, it's a one-shot thing
  32. - simple: daemon doesn't fork by himself
  33. - virtual: used only for dependencies ordering
  34. Requires are used for relationship, like udev can only be started when loopback have been brought up.
  35. ## Default values
  36. - Autostart: true
  37. - Type: forking