4 ms·
Next: systemd for windows?
by oflebbe 3y ago
Next: systemd for windows?
- cogman10 3y agoAlready there. Windows has had services for a long time managed pretty similarly to systemd/launchd.
- madspindel 3y agoWell, compare how to start syncthing automatically on Windows: https://docs.syncthing.net/users/autostart.html https://docs.syncthing.net/users/autostart.html On Debian I could just type: systemctl --user enable --now syncthing.service Native systemd on Windows would be awesome. Microsoft should hire the creator of systemd...
- bigstrat2003 3y agoLooking at that page, it looks like syncthing chooses to not provide a Windows service. That is where 100% of the complexity is coming from. If they did provide a Windows service, then it would be as simple as opening the service manager, and setting the startup type from "manual" to "automatic". It's not fair to blame Windows for the developers of an app not using its features. Similarly, if syncthing didn't bother to create a unit file on Linux, your example would no longer be a simple one liner. That wouldn't be systemd's fault though.
- marwis 3y agoThe manual GUI steps could be replaced with single command line on windows too. https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/schtasks https://learn.microsoft.com/en-us/windows-server/administrat...
- pjmlp 3y agoPowershell exists.
- magicalhippo 3y agoThere's sc[1] on Windows for this, though many services can do it themselves, eg myservice.exe /install Of course, the application must support the service interface[2] to do this, which is like providing the .service file for systemd. The key difference is that it's built into the application[3] in Windows, not external like with systemd, which has pros and cons. [1]: https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/sc-create https://learn.microsoft.com/en-us/windows-server/administrat... [2]: https://learn.microsoft.com/en-us/windows/win32/services/services https://learn.microsoft.com/en-us/windows/win32/services/ser... [3]: https://learn.microsoft.com/en-us/windows/win32/services/service-programs https://learn.microsoft.com/en-us/windows/win32/services/ser...
- jraph 3y agoCoincidentally, Lennart works at MS. I don't know what he works on there though.