summaryrefslogtreecommitdiff
path: root/gdm-restart.in
diff options
context:
space:
mode:
authorGeorge Lebl <jirka@5z.com>2001-05-24 22:32:02 +0000
committerGeorge Lebl <jirka@src.gnome.org>2001-05-24 22:32:02 +0000
commit381aed51fba1eba7c6c7f8badcc9db1bdd129a52 (patch)
treeb321938c37f930af2c541ac79681b8fd2841058c /gdm-restart.in
parentbcdce6315131ca153aff2522c014caab3e1b070a (diff)
downloadgdm-381aed51fba1eba7c6c7f8badcc9db1bdd129a52.tar.gz
a script to restart the gdm daemon, in sbin for root pleasure only
Thu May 24 15:32:54 2001 George Lebl <jirka@5z.com> * configure.in, gdm-restart.in, Makefile.am: a script to restart the gdm daemon, in sbin for root pleasure only * gdm.spec.in: redo the file list to be hopefully sane * daemon/gdm.c: actually read in GdmConfigurator * gui/gdmconfig.c: show help fromt he help button * gui/gdmlogin.c, gui/gdmwm.[ch]: add some short-circuit functions for window moving, bypassing the window management foo. This makes quiver nice again.
Diffstat (limited to 'gdm-restart.in')
-rwxr-xr-xgdm-restart.in13
1 files changed, 13 insertions, 0 deletions
diff --git a/gdm-restart.in b/gdm-restart.in
new file mode 100755
index 00000000..f602d292
--- /dev/null
+++ b/gdm-restart.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 -HUP `cat $PIDFILE`