[X2Go-Commits] x2gobroker.git - master (branch) updated: 0.0.2.3-95-g25328d4

X2Go dev team git-admin at x2go.org
Wed Dec 18 20:54:59 CET 2013


The branch, master has been updated
       via  25328d4ffcb3a9cd48be31558e2cad253cbcc298 (commit)
      from  e32b5c95715d9b993864154d9c9d887893921d03 (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 25328d4ffcb3a9cd48be31558e2cad253cbcc298
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Sat Dec 14 02:24:59 2013 +0100

     rpm/*.init: Provide initscripts that are likely to work on RHEL plus derivatives.

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

Summary of changes:
 debian/changelog                |    2 +
 rpm/x2gobroker-authservice.init |  157 +++++++++++++++++++++++++++++++++++++++
 rpm/x2gobroker-daemon.init      |  155 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 314 insertions(+)
 create mode 100644 rpm/x2gobroker-authservice.init
 create mode 100644 rpm/x2gobroker-daemon.init

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 2939094..5a6e1c9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -75,6 +75,8 @@ x2gobroker (0.0.3.0-0x2go1) UNRELEASED; urgency=low
       Apache2.4 / Apache2.2.
   * debian/source/format:
     + Switch to format 1.0.
+  * rpm/*.init:
+    + Provide initscripts that are likely to work on RHEL plus derivatives.
 
  -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Fri, 07 Jun 2013 23:25:30 +0200
 
diff --git a/rpm/x2gobroker-authservice.init b/rpm/x2gobroker-authservice.init
new file mode 100644
index 0000000..cfba2dc
--- /dev/null
+++ b/rpm/x2gobroker-authservice.init
@@ -0,0 +1,157 @@
+#!/bin/sh
+#
+# x2gobroker-authservice - Starts/stop the "x2gobroker-authservice" daemon
+#
+# chkconfig:   2345 99 1
+# description: Cleans the X2Go session database
+
+### BEGIN INIT INFO
+# Provides: x2gobroker-authservice
+# Required-Start: $local_fs
+# Required-Stop: $local_fs
+# Default-Start: 2345
+# Default-Stop: 016
+# Short-Description: X2Go Session Broker PAM Authentication Service
+# Description:       PAM authentication service for X2Go Session Broker
+### END INIT INFO
+
+set -eu
+
+AUTHSERVICE=/usr/sbin/x2gobroker-authservice
+test -d /run && RUNDIR=/run || RUNDIR=/var/run
+DEFAULTCONFIG_COMMON=/etc/default/python-x2gobroker
+DEFAULTCONFIG_AUTHSERVICE=/etc/default/x2gobroker-authservice
+
+test -x "$AUTHSERVICE" || exit 0
+
+START_AUTHSERVICE=false
+X2GOBROKER_DEBUG=0
+X2GOBROKER_DAEMON_USER='x2gobroker'
+X2GOBROKER_DAEMON_GROUP='x2gobroker'
+X2GOBROKER_AUTHSERVICE_SOCKET="$RUNDIR/x2gobroker/x2gobroker-authservice.socket"
+test -f $DEFAULTCONFIG_COMMON && . $DEFAULTCONFIG_COMMON
+test -f $DEFAULTCONFIG_AUTHSERVICE && . $DEFAULTCONFIG_AUTHSERVICE
+
+if ! getent passwd $X2GOBROKER_DAEMON_USER 1>/dev/null 2>/dev/null; then
+        X2GOBROKER_DAEMON_USER=nobody
+fi
+if ! getent group $X2GOBROKER_DAEMON_GROUP 1>/dev/null 2>/dev/null; then
+        X2GOBROKER_DAEMON_GROUP=nogroup
+fi
+
+export X2GOBROKER_DEBUG
+export X2GOBROKER_DAEMON_USER
+export X2GOBROKER_DAEMON_GROUP
+export X2GOBROKER_AUTHSERVICE_SOCKET
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+exec=$AUTHSERVICE
+prog=$(basename $AUTHSERVICE)
+config=$DEFAULTCONFIG_AUTHSERVICE
+OPTS="-s $X2GOBROKER_AUTHSERVICE_SOCKET -o root -g $X2GOBROKER_DAEMON_GROUP -p 0660"
+
+lockfile=/var/lock/subsys/$prog
+
+
+is_true()
+{
+	case "${1:-}" in
+		[Yy]es|[Yy]|1|[Tt]|[Tt]rue) return 0;;
+		*) return 1;
+	esac
+}
+
+
+start() {
+[ -x $exec ] || exit 5
+	if ps a -u root | grep $(basename $AUTHSERVICE) 1>/dev/null 2>/dev/null; then
+		echo "X2Go Broker Authentication Service already running"
+		START_AUTHSERVICE=no
+	fi
+	if is_true $START_AUTHSERVICE; then
+		# Make sure these are created by default so that nobody else can
+		echo -n $"Starting $prog: "
+		rm -f $X2GOBROKER_AUTHSERVICE_SOCKET
+		set +e
+		daemon $exec $OPTS
+		retval=$?
+		set -e
+		echo
+		[ $retval -eq 0 ] && touch $lockfile
+	fi
+}
+
+
+stop() {
+	echo -n $"Stopping $prog: "
+	set +e
+	killproc $exec
+	retval=$?
+	set -e
+	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 $?
+
diff --git a/rpm/x2gobroker-daemon.init b/rpm/x2gobroker-daemon.init
new file mode 100644
index 0000000..6915982
--- /dev/null
+++ b/rpm/x2gobroker-daemon.init
@@ -0,0 +1,155 @@
+#!/bin/sh
+#
+# x2gobroker-daemon - Starts/stop the "x2gobroker-daemon" daemon
+#
+# chkconfig:   2345 99 1
+# description: Cleans the X2Go session database
+
+### BEGIN INIT INFO
+# Provides: x2gobroker-daemon
+# Required-Start: $local_fs
+# Required-Stop: $local_fs
+# Default-Start: 2345
+# Default-Stop: 016
+# Short-Description: X2Go Session Broker Standalone Daemon
+# Description:      X2Go Session Broker comes with its own HTTP daemon
+### END INIT INFO
+
+set -eu
+
+DAEMON=/usr/bin/x2gobroker
+test -d /run && RUNDIR=/run || RUNDIR=/var/run
+PIDFILE_BROKER=$RUNDIR/x2gobroker/x2gobroker-daemon.pid
+DEFAULTCONFIG_COMMON=/etc/default/python-x2gobroker
+DEFAULTCONFIG_DAEMON=/etc/default/x2gobroker-daemon
+
+test -x "$DAEMON" || exit 0
+
+START_BROKER=false
+DAEMON_BIND_ADDRESS=127.0.0.1:8080
+X2GOBROKER_DEBUG=0
+X2GOBROKER_DAEMON_USER='x2gobroker'
+X2GOBROKER_DAEMON_GROUP='x2gobroker'
+X2GOBROKER_DEFAULT_BACKEND="zeroconf"
+X2GOBROKER_CONFIG="/etc/x2go/x2gobroker.conf"
+X2GOBROKER_SESSIONPROFILES="/etc/x2go/broker/x2gobroker-sessionprofiles.conf"
+X2GOBROKER_AGENT_CMD="/usr/lib/x2go/x2gobroker-agent"
+X2GOBROKER_AUTHSERVICE_SOCKET="$RUNDIR/x2gobroker/x2gobroker-authservice.socket"
+X2GOBROKER_SSL_CERTFILE=
+X2GOBROKER_SSL_KEYFILE=
+test -f $DEFAULTCONFIG_COMMON && . $DEFAULTCONFIG_COMMON
+test -f $DEFAULTCONFIG_DAEMON && . $DEFAULTCONFIG_DAEMON
+
+if ! getent passwd $X2GOBROKER_DAEMON_USER 1>/dev/null 2>/dev/null; then
+        X2GOBROKER_DAEMON_USER=nobody
+fi
+if ! getent group $X2GOBROKER_DAEMON_GROUP 1>/dev/null 2>/dev/null; then
+        X2GOBROKER_DAEMON_GROUP=nogroup
+fi
+
+# mend user ID variables when --chuid $X2GOBROKER_DAEMON_USER is used with start-stop-daemon
+export LOGNAME=$X2GOBROKER_DAEMON_USER
+export USER=$X2GOBROKER_DAEMON_USER
+export USERNAME=$X2GOBROKER_DAEMON_USER
+
+export X2GOBROKER_DEBUG
+export X2GOBROKER_DAEMON_USER
+export X2GOBROKER_DAEMON_GROUP
+export X2GOBROKER_CONFIG
+export X2GOBROKER_DEFAULT_BACKEND
+export X2GOBROKER_SESSIONPROFILES
+export X2GOBROKER_AGENT_CMD
+export X2GOBROKER_AUTHSERVICE_SOCKET
+export X2GOBROKER_SSL_CERTFILE
+export X2GOBROKER_SSL_KEYFILE
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+exec=$DAEMON
+prog=$(basename $DAEMON)
+config=$DEFAULTCONFIG_DAEMON
+OPTS="--mode HTTP -p \"$DAEMON_BIND_ADDRESS\""
+
+lockfile=/var/lock/subsys/$prog
+
+start() {
+[ -x $exec ] || exit 5
+	if ps a -u $X2GOBROKER_DAEMON_USER | grep $(basename $DAEMON) 1>/dev/null 2>/dev/null; then
+		echo "X2Go Session Broker already running"
+		START_BROKER=no
+	fi
+	if is_true $START_BROKER; then
+		echo -n $"Starting $prog: "
+		set +e
+		su - $X2GOBROKER_DAEMON_USER -c "daemon $exec $OPTS"
+		retval=$?
+		set -e
+		echo
+		[ $retval -eq 0 ] && touch $lockfile
+	fi
+}
+
+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
-- 
x2gobroker.git (HTTP(S) Session broker for X2Go)

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 "x2gobroker.git" (HTTP(S) Session broker for X2Go).




More information about the x2go-commits mailing list