Add ExecReload support for credential reload in systemd unit

This commit is contained in:
Ilia Zhirov
2026-03-06 19:52:40 +05:00
parent ad71b1377e
commit 4023a8c45c

View File

@@ -4,6 +4,9 @@
# sudo cp trusttunnel.service.template /etc/systemd/system/trusttunnel.service
# sudo systemctl daemon-reload
# sudo systemctl enable --now trusttunnel
#
# To reload TLS hosts and credentials without restarting:
# sudo systemctl reload trusttunnel
[Unit]
Description=TrustTunnel endpoint
@@ -14,6 +17,7 @@ Wants=network-online.target
Type=simple
WorkingDirectory=/opt/trusttunnel
ExecStart=/opt/trusttunnel/trusttunnel_endpoint vpn.toml hosts.toml
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
RestartSec=3