Files
ssm/examples/services/tinc
T

19 lines
476 B
Plaintext
Raw Normal View History

2018-03-09 02:31:14 +03:00
#!/usr/bin/env ssm
2026-11-27 16:14:30 +00:00
# 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-}"
2018-03-09 02:31:14 +03:00
service_respawn = on-failure
service_command = /usr/bin/tincd -D -n "$tinc_network"
2026-11-27 16:14:30 +00:00
pre_start() {
if [[ ! -d "/etc/tinc/$tinc_network" ]]; then
err "tinc network '$tinc_network' has no config directory"
return 17
fi
}