SSH with -N and -f in an upstart job

Jamon Camisso jamon.camisso-H217xnMUJC0sA/PxXw9srA at public.gmane.org
Tue Mar 20 14:26:22 UTC 2012


On 12-03-19 10:39 PM, DAVID CHIPMAN wrote:
> From: Jamon Camisso <jamon.camisso-H217xnMUJC0sA/PxXw9srA at public.gmane.org>
> sudo -u munin ssh muninuser at node1 -L 5001:127.0.0.1:4949 -N -f
> sudo -u munin ssh muninuser at node2 -L 5002:127.0.0.1:4949 -N -f
> sudo -u munin ssh muninuser at node3 -L 5003:127.0.0.1:4949 -N -f
> 
> The problem is that if I put these into exec statements in an upstart
> job, only the first one executes, the other two do not.
> 
> I've also tried calling a bash script containing the commands, but
> upstart just hangs in that case.
> 
> Anyone here who has written upstart jobs that might be able to point me
> in the right direction?
> 
> I'm trying to use upstart instead of an init.d script or rc.local
> because it seems like a reasonably clean way to run processes like this
> on startup.
> 
> Jamon
> Sorry abou the HTML... Why don't you use a regular shell script, and call that from the upsatrt script using a single exec?

I tried that as well - I noted that when called as a script, upstart
just hangs indefinitely and doesn't even establish a single SSH session.

Jamon
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list