diff options
Diffstat (limited to 'gdm-stop.in')
-rwxr-xr-x | gdm-stop.in | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gdm-stop.in b/gdm-stop.in new file mode 100755 index 00000000..0474c0ff --- /dev/null +++ b/gdm-stop.in @@ -0,0 +1,13 @@ +#!/bin/sh +PIDFILE=`grep '^PidFile=' @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 -TERM `cat $PIDFILE` |