Better examples

Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
2026-11-27 16:14:30 +00:00
parent fd658f7545
commit f74df5962e
11 changed files with 152 additions and 25 deletions
+13 -2
View File
@@ -1,7 +1,18 @@
#!/usr/bin/env ssm
# This trick was neat back in 2011, I swear
var tinc_network = "${service_name##*-}"
# 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
}