barker/docker/files/knox-redis-tunnel.service
2021-07-24 12:58:24 +05:30

16 lines
440 B
Desktop File

[Unit]
Description=Keep ssh tunnel to specified remote host open
After=network.target
[Service]
User=pi
ExecStart=/usr/bin/ssh -NT -o ServerAliveInterval=60 -o ExitOnForwardFailure=yes -o ServerAliveCountMax=3 -o StrictHostKeyChecking=no -i /home/pi/.ssh/id_rsa -L 6379:localhost:6379 tanshu@knox.tanshu.com
# Restart every >2 seconds to avoid StartLimitInterval failure
RestartSec=5
Restart=always
[Install]
WantedBy=multi-user.target