| 1 | #!/bin/bash |
| 2 | PIDFILE=`grep '^PidFile=' /etc/X11/gdm/gdm.conf | sed -e 's/^PidFile=//'` |
| 3 | if test x$PIDFILE = x ; then |
| 4 | echo "Can't find the PID file in the configuration file, going to try:" |
| 5 | echo "/var/run/gdm.pid" |
| 6 | PIDFILE=/var/run/gdm.pid |
| 7 | fi |
| 8 | if test '!' -f $PIDFILE ; then |
| 9 | echo "$PIDFILE doesn't exist, perhaps GDM isn't running" |
| 10 | exit 1 |
| 11 | fi |
| 12 | # exec the kill to get the correct return code |
| 13 | exec kill -USR1 `cat $PIDFILE` |