From eaf6d5b07bcdd9a3eb9bfdac93566b7432e46c37 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Tue, 17 Jan 2023 12:33:50 +0100 Subject: Lindy on NixOS --- lindy/old/systemd/secure-tunnel@.service | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 lindy/old/systemd/secure-tunnel@.service (limited to 'lindy/old/systemd/secure-tunnel@.service') diff --git a/lindy/old/systemd/secure-tunnel@.service b/lindy/old/systemd/secure-tunnel@.service new file mode 100644 index 0000000..5054dd2 --- /dev/null +++ b/lindy/old/systemd/secure-tunnel@.service @@ -0,0 +1,16 @@ +[Unit] +Description=Setup a secure tunnel to %I +After=network.target + +[Service] +Environment="TARGET_PORT=22" +EnvironmentFile=/home/lx/.config/secure-tunnel/%i.conf +ExecStart=/usr/bin/ssh -NT -o ServerAliveInterval=60 -o ExitOnForwardFailure=yes -p ${TARGET_PORT} ${TUNNEL_DEF} ${TARGET} + +# Restart every >2 seconds to avoid StartLimitInterval failure +RestartSec=5 +Restart=always + +[Install] +WantedBy=default.target + -- cgit v1.2.3