Mailinglist Archive: opensuse (5130 mails)

< Previous Next >
Re: [SLE] Permanent sshtunnel for mysql master/slave connection ?
  • From: "Bryan J. Smith" <b.j.smith@xxxxxxxx>
  • Date: Wed, 17 May 2006 08:22:52 -0400
  • Message-id: <1147868572.2783.6.camel@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
On 5/17/06, Wilfred van Velzen <wvvelzen@xxxxxxxxx> wrote:
> This works ok, but when I run this script on a remote shell the script gets
> killed when I close the shell. So should I make a script in /etc/init.d to
> make this a more permanent solution, or is there a better way?

On Wed, 2006-05-17 at 10:58 +0200, Mello wrote:
> Hi Wilfred, I'd suggest that you use the "screen" command to make your
> script run permanently even when you close the remote shell.

Agreed.

"nohup" won't work, as "ssh" requires a terminal. So "screen" is one of
the few options that will work.

You can setup "screen" to automagically launch commands in whatever
screen you wish when started. I.e., you should write your script to
launch the commands under screen.

The nice, additional benefit of this approach is that you can check on
the status at any time by connecting to that running screen.

-- Bryan

P.S. Another option would be to dedicate tty8 or something to running
this script. That would work on boot.

--
Bryan J. Smith Professional, technical annoyance
mailto:b.j.smith@xxxxxxxx http://thebs413.blogspot.com
-----------------------------------------------------------
Americans don't get upset because citizens in some foreign
nations can burn the American flag -- Americans get upset
because citizens in those same nations can't burn their own



< Previous Next >