summaryrefslogblamecommitdiff
path: root/old/lindy/systemd/secure-tunnel@.service
blob: 5054dd22e546223f2036e0811a511f5b50f9374f (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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