.bashrc & .bash_logout

Advertisement

aibon
Joined:
Posts:
3

.bashrc & .bash_logout

I wonder if its possible to get a bash_logout to work. .bashrc wors fine with sftp, but i cant manage to get a .bash_logout to work. is this supported by winscp or could this be possible for a future version?
would be a great feature.. really great for people with clustered servers, as we for example have set up 3 webservers and a few ppl are uloading stuff to to the master with winscp. so it would be really neat to make a rsync in the .bash_logout and synchronize with the slaves after uploading... doing this in cron every couple of minutes isnt quite as elegant as this would be. or does any1 got another suggestion how this can be done?

thx a lot ....
and keep on the good work with winscp, i really like this litte program...

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,548
Location:
Prague, Czechia

Re: .bashrc & .bash_logout

.bashrc is not invoked by the client, but by the server. So in the same way, the .bash_logout must be invoked by the server. I cannot add any support for this to WinSCP. It is natural, as obviously the scripts are platform dependent. For example there are so such scripts on Windows.

Reply with quote

aibon

thx for the fast answer. as i found out the .bash_logout is only executed when issuing a "exit", "logout" or "bye". think the problem is, that winscp just closes the session...

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,548
Location:
Prague, Czechia

aibon wrote:

thx for the fast answer. as i found out the .bash_logout is only executed when issuing a "exit", "logout" or "bye". think the problem is, that winscp just closes the session...
What protocol are you using, SCP or SFTP? With SCP I can maybe issue 'exit' command before logout. But SFTP protocol does not have anything like this.

Reply with quote

aibon
Joined:
Posts:
3

martin wrote:

What protocol are you using, SCP or SFTP? With SCP I can maybe issue 'exit' command before logout. But SFTP protocol does not have anything like this.

are you sure? with scp i can't get .bashrc to execute on login, this works only with sftp....

Reply with quote

Advertisement

martin
Site Admin
martin avatar

aibon wrote:

are you sure? with scp i can't get .bashrc to execute on login, this works only with sftp....
Yes, I'm sure.

Reply with quote

asz
Guest

Is this problem solved?

Hi
I am experiencing the same problem with .bash_logout. Has this been fixed in some winscp version, 2002 was a while ago?

/andreas

Reply with quote

martin
Site Admin
martin avatar

Re: Is this problem solved?

asz wrote:

I am experiencing the same problem with .bash_logout. Has this been fixed in some winscp version, 2002 was a while ago?
Well, this is not a bug. And the functionality has not been implemented, as there was no demand for that. Added to tracker though.

Reply with quote

Advertisement

You can post new topics in this forum