From dc1f55182d87538e16eda9d8e662e2a3ac5b1731 Mon Sep 17 00:00:00 2001 From: Thomas Dehaeze Date: Mon, 9 May 2022 10:02:26 +0200 Subject: [PATCH] Add ssh tunnel to ESRF --- systemd.org | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/systemd.org b/systemd.org index 7999508..e11d5a8 100644 --- a/systemd.org +++ b/systemd.org @@ -375,3 +375,26 @@ Restart=always [Install] WantedBy=default.target #+end_src + +* =esrf-tunnel= - SSH Tunnel +** Service +:PROPERTIES: +:header-args: :tangle ~/.config/systemd/user/esrf-tunnel.service +:header-args+: :comments both :mkdirp yes +:END: + +#+begin_src conf +[Unit] +Description=Setup a secure tunnel with ESRF +After=network.target + +[Service] +ExecStart=/usr/bin/ssh -o ServerAliveInterval=60 -o ExitOnForwardFailure=yes -D 8081 -q -N -T rnice.esrf.fr + +# Restart every >2 seconds to avoid StartLimitInterval failure +RestartSec=5 +Restart=always + +[Install] +WantedBy=default.target +#+end_src