~sbalneav/ltsp/xexit

« back to all changes in this revision

Viewing changes to 99killeverything

  • Committer: Scott Balneaves
  • Date: 2011-03-29 16:50:29 UTC
  • Revision ID: sbalneav@ltsp.org-20110329165029-a1vaq34lat6yzj52
Use juha's nice script (with slight mods), add Juha to AUTHORS, add XEXITSENTINEL env, update manpage, bump to 1.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
pkill -9 -u $USER
 
1
#
 
2
# Script courtesy of Juha Erkkilä.  See:
 
3
#
 
4
# http://www.opinsys.fi/en/killing-user-processes-with-xexit-on-ltsp-servers
 
5
#
 
6
 
 
7
lookup_ltsp_session_processes() {
 
8
  ps eww -u $USER \
 
9
    | grep -w "SSH_CLIENT=$SSH_CLIENT" \
 
10
    | grep -v "XEXITSENTINEL" \
 
11
    | awk '{ print $1 }'
 
12
}
 
13
 
 
14
logger "kill_desktop_session: killing all session processes of user $USER on $LTSP_CLIENT_HOSTNAME"
 
15
lookup_ltsp_session_processes | xargs kill -CONT
 
16
lookup_ltsp_session_processes | xargs kill -TERM
 
17
sleep 2
 
18
lookup_ltsp_session_processes | xargs kill -KILL
 
19
 
 
20
true