File: gdm-safe-restart.in

package info (click to toggle)
gdm 2.6.0.8-1sarge2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 21,456 kB
  • ctags: 2,617
  • sloc: ansic: 39,481; sh: 9,282; xml: 7,931; makefile: 869; perl: 30
file content (13 lines) | stat: -rwxr-xr-x 431 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh
PIDFILE=`grep '^PidFile=' @EXPANDED_SYSCONFDIR@/gdm/gdm.conf | sed -e 's/^PidFile=//'`
if test x$PIDFILE = x ; then
	echo "Can't find the PID file in the configuration file, going to try:"
	echo "/var/run/gdm.pid"
	PIDFILE=/var/run/gdm.pid
fi
if test '!' -f $PIDFILE ; then
	echo "$PIDFILE doesn't exist, perhaps GDM isn't running"
	exit 1
fi
# exec the kill to get the correct return code
exec kill -USR1 `cat $PIDFILE`