Skip to content

Instantly share code, notes, and snippets.

@firejox
Last active May 31, 2024 14:30
Show Gist options
  • Save firejox/beebf1f35dc93dcf669ef4731fd45cfe to your computer and use it in GitHub Desktop.
Save firejox/beebf1f35dc93dcf669ef4731fd45cfe to your computer and use it in GitHub Desktop.
WSL keep alive (pure systemd file)
[Unit]
Description=WSL Keep Distro Alive
Requires=wsl-keepalive.socket
After=wsl-keepalive.socket
[Service]
ExecStart=/init /mnt/c/Windows/System32/choice.exe /mnt/c/Windows/System32/choice.exe /n
StandardInput=socket
[Install]
WantedBy=multi-user.target
[Unit]
Description=WSL Keep Distro Alive Socket
PartOf=wsl-keepalive.service
[Socket]
ListenFIFO=/run/WSL/keep-alive
RemoveOnStop=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment