ansible/roles/autossh/templates/autossh.service.j2

21 lines
534 B
Plaintext
Raw Normal View History

2019-12-02 02:40:12 +00:00
# {{ 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=
2019-12-04 02:18:54 +00:00
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
2019-12-02 02:40:12 +00:00
Restart=always
RestartSec=60
2019-12-04 02:17:37 +00:00
RuntimeDirectory=autossh
2019-12-02 02:40:12 +00:00
PIDFile={{ autossh_run_path }}/%i.pid
[Install]
WantedBy=multi-user.target