smheidrich / kitphysikpool-logout

logs you out of all other shared KIT physics department computers ("Poolraum-PCs")
0 stars 0 forks source link

Kill all processes, not just KDE #4

Closed smheidrich closed 8 years ago

smheidrich commented 8 years ago

Except of course the processes that make the script work in the first place (sshd, bash).

smheidrich commented 8 years ago

This shows how to get the PID of the sshd instance we are connected to:

echo 'parent_pid="$(ps -p $$ -o ppid=)"; ps -p "$parent_pid" -o comm,uid' | ssh HOSTNAME
smheidrich commented 8 years ago

Implemented in https://github.com/smheidrich/kitphysikpool-logout/commit/026faf12493241b3c74b9ab487bdfe612d11ebeb.