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.

18 lines
388 B

  1. ### Minimal windows service stub
  2. Programs designed to run from most *nix style operating systems
  3. can import this package to enable running programs as services without modifying
  4. them.
  5. ```
  6. import _ "github.com/kardianos/minwinsvc"
  7. ```
  8. If you need more control over the exit behavior, set
  9. ```
  10. minwinsvc.SetOnExit(func() {
  11. // Do something.
  12. // Within 10 seconds call:
  13. os.Exit(0)
  14. })
  15. ```