On May 3, 2015 6:02:48 AM EDT, Per Jessen <per@computer.org> wrote:
Greg Freemyer wrote:
I'm trying to get 2 reverse tunnels setup via autossh.
There is a autossh.service file in the autossh package but it only setups one tunnel.
This is the template service file that ships in the RPM.
=============================== [Unit] Description=AutoSSH service for port 2222 After=network.target
[Service] Environment="AUTOSSH_GATETIME=0" ExecStart=/usr/bin/autossh -M 0 -NL 2222:localhost:2222 -o TCPKeepAlive=yes foo@bar.com
[Install] WantedBy=multi-user.target ==================================
I need to call autossh twice.
Should I just create 2 separate service files? Or can I have 2 ExecStart lines?
Create two instances?
Thanks Per, I actually asked on the packaging list and got help already. I've created an SR that supports multiple instances. Since the process is new to me I wrote a decent readme doc so other users of autossh can do it as well. https://build.opensuse.org/request/show/304978 See README.SUSE.md in that SR. I'm very happy with that SR and the readme in particular. I had to learn a fair amount about systemd service enablement to write it. People unfamiliar with systemd instantiated services or service override files may want to read the readme in that SR. I'd post a link straight to the readme but it doesn't have a permanent url yet. Greg -- Sent from my Android device with K-9 Mail. Please excuse my brevity. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org