mharizanov
Posts: 19
Joined: Thu May 31, 2012 12:57 pm

Run a script on session close (SSH, RDP)?

Sat May 31, 2014 6:12 pm

Hi,
googled a bit but could not find a solution to this:
I'd like a shell script with some cleanup functions to run after I logout of SSH or RDP session to my Pi, is that possible?
Thanks for pointers

User avatar
DougieLawson
Posts: 39139
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Run a script on session close (SSH, RDP)?

Sat May 31, 2014 6:57 pm

nano /home/pi/.bash_logout
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

mharizanov
Posts: 19
Joined: Thu May 31, 2012 12:57 pm

Re: Run a script on session close (SSH, RDP)?

Mon Jun 02, 2014 10:57 am

Thanks,
will dig into that. I suppose this is not going to work for RDP sessions, only ssh ones.
Regards

Return to “Beginners”