Launch script after SFTP disconnect
Posted
by
Mates
on Super User
See other posts from Super User
or by Mates
Published on 2012-09-29T21:28:16Z
Indexed on
2012/09/29
21:40 UTC
Read the original article
Hit count: 190
I'm currently using Caja (basically the same as Nautilus) to connect using SSH to my server and work with files. What I'm looking for is a way to launch a simple script when I disconnect - I can launch a script after disconnecting from the TTY by putting it into ~/.bash_logout file, but that is not executed when disconnecting from a file manager. The only idea I have is to set up a cronjob which would be checking for existing sftp-server or sshd processes periodicaly and launched the script when there's no such process running. Is there any easier way to do this?
© Super User or respective owner