2020-07-31 12:41:53 +02:00
|
|
|
[Unit]
|
|
|
|
Description=Setup a secure tunnel to %I
|
|
|
|
After=network.target
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
Environment="AUTOSSH_GATETIME=0"
|
|
|
|
EnvironmentFile=/etc/default/secure-tunnel@%i
|
2020-08-01 12:38:43 +02:00
|
|
|
ExecStart=/usr/bin/autossh -M 0 -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" -o "ExitOnForwardFailure yes" -NR ${JH_PORT}:localhost:"${HTE_PORT}" "${USER}"@"${TARGET}"
|
2020-07-31 12:41:53 +02:00
|
|
|
User=autossh
|
2020-07-31 21:56:43 +02:00
|
|
|
Restart=on-failure
|
|
|
|
RestartSec=5s
|
2020-07-31 12:41:53 +02:00
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|