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: 36557
Joined: Sun Jun 16, 2013 11:19 pm
Location: 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: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

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”