[X2Go-Commits] x2goserver.git - master (branch) updated: 3.1.1.3-260-g2fe648b

X2Go dev team git-admin at x2go.org
Sat Dec 7 22:46:26 CET 2013


The branch, master has been updated
       via  2fe648b475034425f52154f3be6244351b1b6e0b (commit)
      from  f529384a2fcdc581286374f8839e3741e45e353c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 2fe648b475034425f52154f3be6244351b1b6e0b
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Sun Dec 1 00:18:07 2013 +0100

    Add init script for RPM based distro. Taken from the Fedora package.

-----------------------------------------------------------------------

Summary of changes:
 debian/changelog           |    2 +
 rpm/x2gocleansessions.init |  107 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 109 insertions(+)
 create mode 100644 rpm/x2gocleansessions.init

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index d1ced55..f4b0ff0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -66,6 +66,8 @@ x2goserver (4.1.0.0-0x2go1) UNRELEASED; urgency=low
 x2goserver (4.0.1.10-0x2go1) UNRELEASED; urgency=low
 
   * Grab systemd service file from Fedora and ship it upstream.
+  * Add init script for RPM based distro. Taken from the Fedora
+    package.
 
  -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Thu, 28 Nov 2013 16:16:22 +0100
 
diff --git a/rpm/x2gocleansessions.init b/rpm/x2gocleansessions.init
new file mode 100644
index 0000000..e87d652
--- /dev/null
+++ b/rpm/x2gocleansessions.init
@@ -0,0 +1,107 @@
+#!/bin/sh
+#
+# x2gocleansessions - Starts/stop the "x2gocleansessions" daemon
+#
+# chkconfig:   2345 99 1
+# description: Cleans the X2Go session database
+
+### BEGIN INIT INFO
+# Provides: x2gocleansessions at batch
+# Required-Start: $local_fs
+# Required-Stop: $local_fs
+# Default-Start: 2345
+# Default-Stop: 016
+# Short-Description: Starts/stop the "x2gocleansessions" daemon
+# Description:      Cleans the X2Go session database
+### END INIT INFO
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+exec=/usr/sbin/x2gocleansessions
+prog="x2gocleansessions"
+config=/etc/sysconfig/x2gocleansessions
+XSOCKDIR=/tmp/.X11-unix
+
+[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
+
+lockfile=/var/lock/subsys/$prog
+
+start() {
+[ -x $exec ] || exit 5
+	# Make sure these are created by default so that nobody else can
+	if [ ! -d $XSOCKDIR ]
+	then
+		mkdir $XSOCKDIR
+		chmod 1777 $XSOCKDIR
+	fi
+	echo -n $"Starting $prog: "
+	daemon $exec $OPTS
+	retval=$?
+	echo
+	[ $retval -eq 0 ] && touch $lockfile
+}
+
+stop() {
+	echo -n $"Stopping $prog: "
+	killproc $exec
+	retval=$?
+	echo
+	rm -f $lockfile
+}
+
+restart() {
+	stop
+	start
+}
+
+reload() {
+	restart
+}
+
+force_reload() {
+	restart
+}
+
+rh_status() {
+	# run checks to determine if the service is running or use generic status
+	status $prog
+}
+
+rh_status_q() {
+	rh_status >/dev/null 2>&1
+}
+
+
+case "$1" in
+	start)
+		rh_status_q && exit 0
+		$1
+		;;
+	stop)
+		rh_status_q || exit 0
+		$1
+		;;
+	restart)
+		$1
+		;;
+	reload)
+		rh_status_q || exit 7
+		$1
+		;;
+	force-reload)
+		force_reload
+		;;
+	status)
+		rh_status
+		;;
+	condrestart|try-restart)
+		rh_status_q || exit 0
+		restart
+		;;
+	*)
+		echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
+		exit 2
+esac
+exit $?
+


hooks/post-receive
-- 
x2goserver.git (X2Go Server)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2goserver.git" (X2Go Server).




More information about the x2go-commits mailing list