tailscale.comtailscale.com/util/systemd Index | Files

package systemd

import "tailscale.com/util/systemd"

Package systemd contains a minimal wrapper around systemd-notify to enable applications to signal readiness and status to systemd.

This package will only have effect on Linux systems running Tailscale in a systemd unit with the Type=notify flag set. On other operating systems (or when running in a Linux distro without being run from inside systemd) this package will become a no-op.

Index

Functions

func Ready

func Ready()

Ready signals readiness to systemd. This will unblock service dependents from starting.

func Status

func Status(format string, args ...any)

Status sends a single line status update to systemd so that information shows up in systemctl output. For example:

$ systemctl status tailscale
● tailscale.service - Tailscale client daemon
Loaded: loaded (/nix/store/qc312qcy907wz80fqrgbbm8a9djafmlg-unit-tailscale.service/tailscale.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2020-11-24 17:54:07 EST; 13h ago
Main PID: 26741 (.tailscaled-wra)
Status: "Connected; user@host.domain.tld; 100.101.102.103"
IP: 0B in, 0B out
Tasks: 22 (limit: 4915)
Memory: 30.9M
CPU: 2min 38.469s
CGroup: /system.slice/tailscale.service
└─26741 /nix/store/sv6cj4mw2jajm9xkbwj07k29dj30lh0n-tailscale-date.20200727/bin/tailscaled --port 41641

Source Files

doc.go systemd_linux.go

Version
v1.84.0 (latest)
Published
May 21, 2025
Platform
linux/amd64
Imports
5 packages
Last checked
1 day ago

Tools for package owners.