21 lines
534 B
Django/Jinja
21 lines
534 B
Django/Jinja
# {{ ansible_managed }}
|
|
|
|
[Unit]
|
|
Description=autossh %I
|
|
Wants=network-online.target
|
|
After=network-online.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
User={{ autossh_user }}
|
|
EnvironmentFile={{ autossh_etc_path }}/%i
|
|
ExecStart=
|
|
ExecStart=/usr/bin/autossh -M 0 -C -q -l {{ autossh_user }} -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=15 -o ServerAliveCountMax=3 -o StrictHostKeyChecking=no $SSH_OPTIONS $SSH_HOST
|
|
Restart=always
|
|
RestartSec=60
|
|
RuntimeDirectory=autossh
|
|
PIDFile={{ autossh_run_path }}/%i.pid
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|