Afficher un message
Vieux 26/03/2008, 22h00   #5
laredotornado
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Running script after logging out of SSH

On Mar 24, 6:16pm, Luuk <L...@invalid.lan> wrote:
> laredotornadoschreef:
>
> > Hi,

>
> > I'm using Fedora Core Linux 6 and currently using zsh, but I can
> > change shells. What I'm wondering is how I would execute a script
> > after I have logged out via SSH. My normal way of working is to use
> > Putty on my Windows XP machine to SSH in to my Linux box. When I
> > click "exit" from Putty when logged in as user "me", I would like to
> > run a script that backs up certain files.

>
> > Thanks, - Dave

>
> type:
> $ man zsh
>
> and search for 'logout'
> (by typeing '/logout'...)
> you'll find the info there
>
> --
> Luuk


So the file is ~/.zlogout. Thanks to the group for that one. Here's
a follow up. My .zlogout file consists of

nohup sh /opt/scripts/backup_web.sh

As I said, I'm logged in through PuTTy on Windows XP, but when I exit,
like below, the window doesn't close, instead it just hangs on the
last line:

[me@mymachine]/opt/scripts% exit
nohup: appending output to `/home/me/nohup.out'

Is there a way to have the process run in the background AND logout so
that the PuTTY window closes? - Dave
  Réponse avec citation
 
Page generated in 0,04886 seconds with 9 queries