[Nottingham] AutoSSH - graceful disconnect?

Jason Irwin jasonirwin73 at gmail.com
Fri Aug 28 08:09:56 UTC 2015


Champion. That explains it. I also stuffed in a check to see if AutoSSH is
already running.

Seeing single connections now. Thanks!

On 27 August 2015 at 14:48, Mike Cardwell <nlug at lists.grepular.com> wrote:

> * on the Thu, Aug 27, 2015 at 02:39:29PM +0100, Jason Irwin wrote:
>
> > Actually, I take that back. What appears to be happening is that the
> > autossh script in /etc/network/if-up.d/ is getting run twice on boot for
> > some reason. Which has me puzzled - isn't that the correct place for a
> > script to live so it gets run when the network is up? (Routable IP etc
> etc).
>
> My understanding is that scripts in /if-up.d/ get run every time any
> interface
> is brought up. So if you're bringing up 2 interfaces, it will get run
> twice.
> It looks like a number of environment variables are set before the script
> is run, so you can check inside the script which interface is being brought
> up and respond accordingly. I.e, exit if it's not eth0 or whatever. I can
> see a number of scripts in there on my system that do things like:
>
> if [ "$IFACE" != lo ]; then
>     blah blah blah
> fi
>
> --
> Mike Cardwell  https://grepular.com https://emailprivacytester.com
> OpenPGP Key    35BC AF1D 3AA2 1F84 3DC3   B0CF 70A5 F512 0018 461F
> XMPP OTR Key   8924 B06A 7917 AAF3 DBB1   BF1B 295C 3C78 3EF1 46B4
>
> _______________________________________________
> Nottingham mailing list
> Nottingham at mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/nottingham
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.lug.org.uk/pipermail/nottingham/attachments/20150828/b2ca5248/attachment.html>


More information about the Nottingham mailing list