[X2Go-Commits] [x2goserver] 06/50: xsettings: add pre-terminate hook.

git-admin at x2go.org git-admin at x2go.org
Thu Jan 14 05:13:50 CET 2016


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch feature/x2goserver-xsettings
in repository x2goserver.

commit 08531bf1d3b34efcab48e578e78f2c3e8253cd79
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Sun Nov 23 04:18:08 2014 +0100

    xsettings: add pre-terminate hook.
---
 x2goserver-xsettings/Makefile                      |    5 +++-
 .../000_xsettings-xsettingsd-shutdown              |   28 ++++++++++++++++++++
 2 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/x2goserver-xsettings/Makefile b/x2goserver-xsettings/Makefile
index 6229b2c..5c710f3 100755
--- a/x2goserver-xsettings/Makefile
+++ b/x2goserver-xsettings/Makefile
@@ -52,7 +52,9 @@ install: install_scripts install_config install_man install_version
 
 install_scripts:
 	$(INSTALL_DIR) $(DESTDIR)$(LIBDIR)/extensions/post-start.d
+	$(INSTALL_DIR) $(DESTDIR)$(LIBDIR)/extensions/pre-terminate.d
 	$(INSTALL_PROGRAM) lib/x2go/extensions/post-start.d/* $(DESTDIR)$(LIBDIR)/extensions/post-start.d/
+	$(INSTALL_PROGRAM) lib/x2go/extensions/pre-terminate.d/* $(DESTDIR)$(LIBDIR)/extensions/pre-terminate.d/
 	$(INSTALL_DIR) $(DESTDIR)$(SHAREDIR)/x2gofeature.d
 	$(INSTALL_PROGRAM) share/x2gofeature.d/*.features $(DESTDIR)$(SHAREDIR)/x2gofeature.d/
 
@@ -74,7 +76,8 @@ install_version:
 uninstall: uninstall_scripts uninstall_config uninstall_man uninstall_version
 
 uninstall_scripts:
-	$(RM_FILE) $(DESTDIR)$(LIBDIR)/extensions/post-start.d/900_xsettingsd*
+	$(RM_FILE) $(DESTDIR)$(LIBDIR)/extensions/post-start.d/900_xsettings-*
+	$(RM_FILE) $(DESTDIR)$(LIBDIR)/extensions/pre-terminate.d/000_xsettings-*
 	for file in $(FEATURE_SCRIPTS); do $(RM_FILE) $(DESTDIR)$(SHAREDIR)/x2gofeature.d/$$file; done
 
 uninstall_config:
diff --git a/x2goserver-xsettings/lib/x2go/extensions/pre-terminate.d/000_xsettings-xsettingsd-shutdown b/x2goserver-xsettings/lib/x2go/extensions/pre-terminate.d/000_xsettings-xsettingsd-shutdown
new file mode 100644
index 0000000..fde8fe6
--- /dev/null
+++ b/x2goserver-xsettings/lib/x2go/extensions/pre-terminate.d/000_xsettings-xsettingsd-shutdown
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+# Copyright (C) 2014 X2Go Project - http://wiki.x2go.org
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the
+# Free Software Foundation, Inc.,
+# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Copyright (C) 2014 Mihai Moldovan <ionic at ionic.de>
+
+export X2GO_SESSION="${1}"
+
+X2GO_SESSIONINFO="$(x2golistsessions | grep "${X2GO_SESSION}")"
+X2GO_SESSION_DIR="${HOME}/.x2go/C-${X2GO_SESSION}/"
+XSETTINGSD_PID="${X2GO_SESSION_DIR}/xsettingsd.pid"
+
+kill "$(cat "${XSETTINGSD_PID}")"

--
Alioth's /srv/git/code.x2go.org/x2goserver.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goserver.git


More information about the x2go-commits mailing list