-- Leo's gemini proxy

-- Connecting to gmi.runtimeterror.dev:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini;lang=en-US

💻 [runtimeterror $]

2023-10-15

Using `systemctl edit` to Delay Service Startup


Following a recent update, I found that the Linux development environment [1] on my Framework Chromebook would fail to load if the Tailscale [2] daemon was already running. It seems that the Tailscale virtual interface may have interfered with how the CrOS Terminal app was expecting to connect to the Linux container. I initially worked around the problem by just disabling the `tailscaled` service, but having to remember to start it up manually was a pretty heavy cognitive load.

[1] Linux development environment

[2] Tailscale

Fortunately, it turns out that overriding the service to insert a short startup delay is really easy. I'll just use the `systemctl edit` command to create a quick override configuration:

sudo systemctl edit tailscaled

This shows me the existing contents of the `tailscaled.service` definition so I can easily insert some overrides above. In this case, I just want to use `sleep 5` as the `ExecStartPre` command so that the service start will be delayed by 5 seconds:

Image: systemctl edit

Upon saving the file, it gets installed to `/etc/systemd/system/tailscaled.service.d/override.conf`. Now the Tailscale interface won't automatically come up until a few seconds later, and that's enough to let my Terminal app start up reliably once more.

Easy peasy.




---


📧 Reply by email



Related articles


Using a Custom Font with Hugo

Self-Hosted Gemini Capsule with gempost and GitHub Actions

Tailscale Serve in a Docker Compose Sidecar

---


Home

This page on the big web

-- Response ended

-- Page fetched on Fri May 10 21:59:10 2024