lucyllewy / one-script-wsl2-systemd

The one-script variant of the systemd hack for WSL2
MIT License
231 stars 38 forks source link

How do I make a unit (service) enable after I have made disable? #33

Closed haosmos closed 2 years ago

haosmos commented 2 years ago

I apologize if my question is not related to your wonderful script.

I installed your script and everything seems to work fine (there is one nuance, I asked this question in a separate post).

But shouldn't it be that when I run the command:

systemctl disable

then afterwards I should also be able to make the unit available again by running the command

systemctl enable ?

In my case, when I execute the command systemctl disable , then after that I can not reactivate the unit.

WindowsTerminal_fDsXaTKzWG

Or is this expected behavior of systemd and cannot be changed?

lucyllewy commented 2 years ago

The service is named ssh.service (no D). Your start and enable commands are failing because you used the wrong name.

lucyllewy commented 2 years ago

Hi, did this solve your problem?

haosmos commented 2 years ago

Hi, did this solve your problem?

I apologize for the long response. Yes, thank you very much! ✌️