File: gdm-restart.in

package info (click to toggle)
gdm 2.16.4-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 20,756 kB
  • ctags: 2,870
  • sloc: ansic: 46,434; xml: 17,760; sh: 13,465; makefile: 1,040; perl: 30
file content (21 lines) | stat: -rwxr-xr-x 582 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

PIDFILE=`gdmflexiserver --command="GET_CONFIG daemon/PidFile"`
CHECKPIDFILE=`echo $PIDFILE | sed 's/^\([^ ]*\) .*$/\1/'`
if [ "x$CHECKPIDFILE" = "xOK" ]; then
	PIDFILE=`echo $PIDFILE | sed 's/^.* \(.*\)$/\1/'`
else
        PIDFILE=""
fi

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 -HUP `cat $PIDFILE`