nullpo-head / wsl-distrod

Distrod is a meta-distro for WSL 2 which installs Ubuntu, Arch, Debian, Gentoo, etc. with systemd in a minute for you. Distrod also has built-in auto-start feature on Windows startup and port forwarding ability.
MIT License
1.9k stars 91 forks source link

Discussion about distro auto shutdown #24

Open sarim opened 2 years ago

sarim commented 2 years ago

In normal use cases, when no more process is running, wsl automatically shuts down the distro. That is obviously won't be possible with distrod, as systemd processes keep running after closing terminal.

Wanted to brainstorm if something similar would be possible with distrod.

nullpo-head commented 2 years ago

Interesting discussion. Although personally I don't need it since my motivation to enable systemd is to run services such as ssh or cron, but indeed it would be a good feature for dustrid to be a good distro for everyone's use cases.

One naive idea is to let users to flag only some services such as ssh to keep WSL running, and terminate the distro when there is no flagged services running.