Files
ssm/examples/services/tinc
T
fbt f74df5962e Better examples
Signed-off-by: fbt <fbt@fleshless.org>
2026-11-27 16:14:30 +00:00

19 lines
476 B
Plaintext
Executable File

#!/usr/bin/env ssm
# One tinc network per service instance.
#
# The service name is expected to look like "tinc-<network>", e.g.
# "tinc-vpn" for the network configured in /etc/tinc/vpn.
var tinc_network = "${service_name#tinc-}"
service_respawn = on-failure
service_command = /usr/bin/tincd -D -n "$tinc_network"
pre_start() {
if [[ ! -d "/etc/tinc/$tinc_network" ]]; then
err "tinc network '$tinc_network' has no config directory"
return 17
fi
}