boinkor-net / hoopsnake

A not-very-featureful SSH server for initrd that listens on your tailscale network
https://github.com/boinkor-net/hoopsnake
Apache License 2.0
2 stars 1 forks source link

In scripted stage1, wait until hoopsnake has exited #17

Closed antifuchs closed 6 months ago

antifuchs commented 6 months ago

By default, the hoopsnake process just sits in the background until stage1 kills it with SIGKILL, which doesn't allow the tailscale process to clean up after itself.

Instead, right before stage1 stops (in the postMountCommands hook), kill the hoopsnake process, then wait for it to exit. Five seconds is how long tsnet gives itself to clean up, so the default of 5s seems right. That should evict an existing node's entry from the list of registered nodes, and allow the next boot to proceed that much cleaner.