[opensuse-factory] Re: [opensuse-packaging] systemd service file question
On Fri, May 1, 2015 at 8:42 PM, Greg Freemyer <greg.freemyer@gmail.com> wrote:
fyi2: In the sysvinit days there was a separate config file, but whoever converted it to a systemd service file dropped that functionality.
So why not restore that functionality and keep only the unit file from /usr? [Service] EnvironmentFile=/etc/autossh.conf ExecStart=/usr/bin/autossh -M $PORT .... Robert -- http://robert.muntea.nu/ -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Fri, May 1, 2015 at 5:00 PM, Robert Munteanu <robert.munteanu@gmail.com> wrote:
On Fri, May 1, 2015 at 8:42 PM, Greg Freemyer <greg.freemyer@gmail.com> wrote:
fyi2: In the sysvinit days there was a separate config file, but whoever converted it to a systemd service file dropped that functionality.
So why not restore that functionality and keep only the unit file from /usr?
[Service] EnvironmentFile=/etc/autossh.conf ExecStart=/usr/bin/autossh -M $PORT ....
Robert
Now that I understand the my.conf override mechanism, what's the advantage? And while I have the systemd brain trust available, what would I do in the service file to allow 2 (or more) simultaneeous tunnels? Something like: ExecStart="/usr/bin/autossh ... &" ExecStart="/usr/bin/autossh ... &" ExecStart="/usr/bin/autossh ..." Thanks Greg -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Fri, May 1, 2015 at 6:56 PM, Greg Freemyer <greg.freemyer@gmail.com> wrote:
On Fri, May 1, 2015 at 5:00 PM, Robert Munteanu
Something like:
ExecStart="/usr/bin/autossh ... &" ExecStart="/usr/bin/autossh ... &" ExecStart="/usr/bin/autossh ..."
nope.. you want instantiated services for that usecase .. http://0pointer.de/blog/projects/instances.html -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Fri, May 1, 2015 at 6:03 PM, Cristian Rodríguez <crrodriguez@opensuse.org> wrote:
On Fri, May 1, 2015 at 6:56 PM, Greg Freemyer <greg.freemyer@gmail.com> wrote:
On Fri, May 1, 2015 at 5:00 PM, Robert Munteanu
Something like:
ExecStart="/usr/bin/autossh ... &" ExecStart="/usr/bin/autossh ... &" ExecStart="/usr/bin/autossh ..."
nope.. you want instantiated services for that usecase .. http://0pointer.de/blog/projects/instances.html
Thanks This seems to work from my testing: Rename the service file in /lib/... to autossh@.service systemctl enable autossh@ssh.service systemctl enable autossh@http.service mkdir -p /etc/systemd/system/autossh@ssh.service.d mkdir -p /etc/systemd/system/autossh@http.service.d vi /etc/systemd/system/autossh@ssh.service.d/my.conf vi /etc/systemd/system/autossh@http.service.d/my.conf systemctl start autossh@ssh.service systemctl start autossh@http.service I'm writing a README.opensuse for autossh. I'll update it to reflect the above. Thanks again, Greg -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
I just did the SR for autossh to its devel project. https://build.opensuse.org/request/show/304978 Anyone who knows systemd or autossh better than me feel free to comment on it. The new README.opensuse explains both the instantiation process and the my.conf override process. The new README.reverse-tunnel.opensuse goes into great detail how to setup a reverse ssh tunnel via autossh and systemd. Greg -- Greg Freemyer On Fri, May 1, 2015 at 7:01 PM, Greg Freemyer <greg.freemyer@gmail.com> wrote:
On Fri, May 1, 2015 at 6:03 PM, Cristian Rodríguez <crrodriguez@opensuse.org> wrote:
On Fri, May 1, 2015 at 6:56 PM, Greg Freemyer <greg.freemyer@gmail.com> wrote:
On Fri, May 1, 2015 at 5:00 PM, Robert Munteanu
Something like:
ExecStart="/usr/bin/autossh ... &" ExecStart="/usr/bin/autossh ... &" ExecStart="/usr/bin/autossh ..."
nope.. you want instantiated services for that usecase .. http://0pointer.de/blog/projects/instances.html
Thanks
This seems to work from my testing:
Rename the service file in /lib/... to autossh@.service
systemctl enable autossh@ssh.service systemctl enable autossh@http.service
mkdir -p /etc/systemd/system/autossh@ssh.service.d mkdir -p /etc/systemd/system/autossh@http.service.d
vi /etc/systemd/system/autossh@ssh.service.d/my.conf vi /etc/systemd/system/autossh@http.service.d/my.conf
systemctl start autossh@ssh.service systemctl start autossh@http.service
I'm writing a README.opensuse for autossh. I'll update it to reflect the above.
Thanks again, Greg -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Sat, 2 May 2015 01:27, Greg Freemyer <greg.freemyer@...> wrote:
I just did the SR for autossh to its devel project.
https://build.opensuse.org/request/show/304978
Anyone who knows systemd or autossh better than me feel free to comment on it.
The new README.opensuse explains both the instantiation process and the my.conf override process.
The new README.reverse-tunnel.opensuse goes into great detail how to setup a reverse ssh tunnel via autossh and systemd.
Greg -- Greg Freemyer
Thank you very much for the invested time and other resources. - Yamaban. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Hi Greg, On Fri, May 01, 2015 at 07:27:49PM -0400, Greg Freemyer wrote:
I just did the SR for autossh to its devel project.
https://build.opensuse.org/request/show/304978
Anyone who knows systemd or autossh better than me feel free to comment on it.
Quite nice work!
The new README.opensuse explains both the instantiation process and the my.conf override process.
The new README.reverse-tunnel.opensuse goes into great detail how to setup a reverse ssh tunnel via autossh and systemd.
I suggest to use the correct spelling of openSUSE or keep it even more simple and add only the SUSE suffix as we have it already present at many other packages. I've added the same comment to request 304978 too. Cheers, Lars -- Lars Müller [ˈlaː(r)z ˈmʏlɐ] Samba Team + SUSE Labs SUSE Linux, Maxfeldstraße 5, 90409 Nürnberg, Germany
On Sat, May 2, 2015 at 10:22 AM, Lars Müller <lmuelle@suse.com> wrote:
Hi Greg,
On Fri, May 01, 2015 at 07:27:49PM -0400, Greg Freemyer wrote:
I just did the SR for autossh to its devel project.
https://build.opensuse.org/request/show/304978
Anyone who knows systemd or autossh better than me feel free to comment on it.
Quite nice work!
The new README.opensuse explains both the instantiation process and the my.conf override process.
The new README.reverse-tunnel.opensuse goes into great detail how to setup a reverse ssh tunnel via autossh and systemd.
I suggest to use the correct spelling of openSUSE or keep it even more simple and add only the SUSE suffix as we have it already present at many other packages.
I've added the same comment to request 304978 too.
Cheers,
Lars
Thanks for the feedback. Resubmitted with a single README.SUSE.md https://build.opensuse.org/request/show/305120 I went with markdown format because of the complexity of the README was marking it hard to read in plain text. I added this to the top of the README file: -- This README is written in markdown format. The retext editor in "preview" mode is one method of viewing it properly. Anyone editing this document should verify it displays properly in retext preview mode before submitting changes. -- I'm not aware of a better openSUSE option for reading markdown files. Thanks Greg -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Hi Greg, On Sat, May 02, 2015 at 05:07:53PM -0400, Greg Freemyer wrote: [ 8< ]>
Resubmitted with a single README.SUSE.md
W00t! Looks quite good! I've suggested some small changes with request 305124
I went with markdown format because of the complexity of the README was marking it hard to read in plain text.
I added this to the top of the README file:
-- This README is written in markdown format. The retext editor in "preview" mode is one method of viewing it properly. Anyone editing this document should verify it displays properly in retext preview mode before submitting changes. --
I'm not aware of a better openSUSE option for reading markdown files.
Looks quite nice. Nevertheless maybe shorter lines in the file are nice to have for plain editors. Maybe max 78 chars for non code lines? Thanks for the rework! Cheers, Lars -- Lars Müller [ˈlaː(r)z ˈmʏlɐ] Samba Team + SUSE Labs SUSE Linux, Maxfeldstraße 5, 90409 Nürnberg, Germany
On Fri, May 1, 2015 at 6:27 PM, Greg Freemyer <greg.freemyer@gmail.com> wrote:
The new README.reverse-tunnel.opensuse goes into great detail how to setup a reverse ssh tunnel via autossh and systemd.
This is just an FYI for people interested in setting up reverse tunnels for managing machines behind firewalls some from central operation server(s). The older fonehome package provides similar reverse ssh tunnel functionality. http://software.opensuse.org/package/fonehome Judging from the README mentioned above, fonehome may be simpler to setup and easier to use. https://code.google.com/p/fonehome/wiki/Setup Disclaimer: I'm the author of the package. -Archie -- Archie L. Cobbs -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Tue, May 5, 2015 at 1:26 PM, Archie Cobbs <archie@dellroad.org> wrote:
On Fri, May 1, 2015 at 6:27 PM, Greg Freemyer <greg.freemyer@gmail.com> wrote:
The new README.reverse-tunnel.opensuse goes into great detail how to setup a reverse ssh tunnel via autossh and systemd.
This is just an FYI for people interested in setting up reverse tunnels for managing machines behind firewalls some from central operation server(s).
The older fonehome package provides similar reverse ssh tunnel functionality.
http://software.opensuse.org/package/fonehome
Judging from the README mentioned above, fonehome may be simpler to setup and easier to use.
https://code.google.com/p/fonehome/wiki/Setup
Disclaimer: I'm the author of the package.
-Archie
Archie, I hope fonehome is simpler to setup. There is nothing "simple" about autossh in my mind, but once setup it has proven reliable for me over the years. Anyway autossh is a rather old package (a decade plus), but the times I have used it I have had to invest many hours to figure out the needed steps. None of the tutorials provided enough detail to let me use it without lots of trial and error getting everything setup. That was the driving factor for me writing the README. I was doing it for myself as much as anyone else. The second driving factor was my need for multiple tunnels. With systemd that was best done with an instantiated service. That too takes some setup and documentation. fyi: autossh can also work when Windows PCs are the ultimate target hidden behind the firewall.: I documented that as well, but not in an openSUSE README: https://lizards.opensuse.org/2015/04/20/using-opensuse-as-a-reverse-tunnel-s... Greg -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Sat, May 2, 2015 at 12:56 AM, Greg Freemyer <greg.freemyer@gmail.com> wrote:
On Fri, May 1, 2015 at 5:00 PM, Robert Munteanu <robert.munteanu@gmail.com> wrote:
On Fri, May 1, 2015 at 8:42 PM, Greg Freemyer <greg.freemyer@gmail.com> wrote:
fyi2: In the sysvinit days there was a separate config file, but whoever converted it to a systemd service file dropped that functionality.
So why not restore that functionality and keep only the unit file from /usr?
[Service] EnvironmentFile=/etc/autossh.conf ExecStart=/usr/bin/autossh -M $PORT ....
Robert
Now that I understand the my.conf override mechanism, what's the advantage?
IMO it's simpler and less error-prone to edit a config file than a systemd unit file. Robert -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Fri, May 1, 2015 at 6:15 PM, Robert Munteanu <robert.munteanu@gmail.com> wrote:
On Sat, May 2, 2015 at 12:56 AM, Greg Freemyer <greg.freemyer@gmail.com> wrote:
On Fri, May 1, 2015 at 5:00 PM, Robert Munteanu <robert.munteanu@gmail.com> wrote:
On Fri, May 1, 2015 at 8:42 PM, Greg Freemyer <greg.freemyer@gmail.com> wrote:
fyi2: In the sysvinit days there was a separate config file, but whoever converted it to a systemd service file dropped that functionality.
So why not restore that functionality and keep only the unit file from /usr?
[Service] EnvironmentFile=/etc/autossh.conf ExecStart=/usr/bin/autossh -M $PORT ....
Robert
Now that I understand the my.conf override mechanism, what's the advantage?
IMO it's simpler and less error-prone to edit a config file than a systemd unit file.
Robert
If I was expert enough with ssh tunnels in a systemd environment to feel I could cover all the bases in a config file I would agree with you. Unfortunately, I still feel like I'm stumbling through this and since I'm not the autossh maintainer in the first place, I'll stick to the override feature and the maintainer can clean it up if they get the urge. Greg -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
participants (6)
-
Archie Cobbs
-
Cristian Rodríguez
-
Greg Freemyer
-
Lars Müller
-
Robert Munteanu
-
Yamaban