systemd autossh.service variables -
i want add systemd service file autossh system. skript should ask viables conf-file. tried until now:
autossh.service:
[unit] description=autossh after=network.target [service] type=simple environmentfile=/usr/local/etc/autossh.conf execstart=/usr/bin/autossh -m 0 -g -c -2 -n -i /home/$tunnel_user/.ssh/id_rsa $tunnel_user@$server_name -p $dest_ssh_port -l $local_port:localhost:$dest_port & restart=always restartsec=60 [install] wantedby=multi-user.target
autossh.conf:
tunnel_user=tunneluser server_name=host.example.com local_port=10001 dest_port=5001 dest_ssh_port=22
unfortunately variables not resolved properly. tried double quoting ""
, things %{local_port}
also.
Comments
Post a Comment