fix: fix SSH service auto-enable issue#12898
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3a34929e33
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
| } else { | ||
| if err := disableSSHSocket(serviceName, false); err != nil { | ||
| if err := disableSSHSocket(serviceName, true); err != nil { |
There was a problem hiding this comment.
Keep the active socket when toggling autostart
When a host is using socket-activated SSH (ssh.socket/sshd.socket active while the service itself is inactive), the Auto start switch now stops the only active listener and then only runs systemctl enable ...service. systemctl --help distinguishes start as "Start (activate)" under Unit Commands from enable as "Enable one or more unit files" under Unit File Commands, so this path can leave SSH unreachable until the service is started or the host reboots; the frontend switch is labeled Auto start and sends enable/disable, so users would not expect it to stop current SSH access.
Useful? React with 👍 / 👎.
No description provided.