[X2Go-Commits] x2gobroker.git - master (branch) updated: 0.0.2.3-135-g617d046

X2Go dev team git-admin at x2go.org
Fri Dec 20 16:12:45 CET 2013


The branch, master has been updated
       via  617d046c3864d73e91aa4f6701a27d43445f1562 (commit)
      from  4a138b8dc508f36034a6020c2b4ba104b981cbb2 (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 617d046c3864d73e91aa4f6701a27d43445f1562
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Fri Dec 20 16:12:39 2013 +0100

    finalize work on RPM init scripts

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

Summary of changes:
 bin/x2gobroker                  |    2 +-
 rpm/x2gobroker-authservice.init |    6 +-----
 rpm/x2gobroker-daemon.init      |   11 +++++------
 3 files changed, 7 insertions(+), 12 deletions(-)

The diff of changes is:
diff --git a/bin/x2gobroker b/bin/x2gobroker
index a505f30..4f646dc 100755
--- a/bin/x2gobroker
+++ b/bin/x2gobroker
@@ -277,7 +277,7 @@ if __name__ == "__main__":
                 daemon_stdout = file(daemon_logdir+'x2gobroker-daemon.stdout', 'w+')
                 daemon_stderr = file(daemon_logdir+'x2gobroker-daemon.stderr', 'w+')
                 with daemon.DaemonContext(stdout=daemon_stdout, stderr=daemon_stderr, files_preserve=keep_fds, umask=0o027, pidfile=lockfile.FileLock(pidfile)):
-                    file(pidfile, 'w+').write(str(os.getpid()))
+                    file(pidfile, 'w+').write(str(os.getpid())+'\n')
                     launch_ioloop()
             else:
                 launch_ioloop()
diff --git a/rpm/x2gobroker-authservice.init b/rpm/x2gobroker-authservice.init
index 7dd3567..9ccaf6c 100755
--- a/rpm/x2gobroker-authservice.init
+++ b/rpm/x2gobroker-authservice.init
@@ -18,7 +18,7 @@
 # Source function library.
 . /etc/rc.d/init.d/functions
 
-set -xe
+set -e
 
 AUTHSERVICE=/usr/sbin/x2gobroker-authservice
 test -d /run && RUNDIR=/run || RUNDIR=/var/run
@@ -67,10 +67,6 @@ is_true()
 
 start() {
 [ -x $exec ] || exit 5
-	if ps a -u root | grep -v grep | grep $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: "
diff --git a/rpm/x2gobroker-daemon.init b/rpm/x2gobroker-daemon.init
index 83da87f..3c2f33e 100755
--- a/rpm/x2gobroker-daemon.init
+++ b/rpm/x2gobroker-daemon.init
@@ -18,7 +18,7 @@
 # Source function library.
 . /etc/rc.d/init.d/functions
 
-set -ex
+set -e
 
 DAEMON=/usr/bin/x2gobroker
 test -d /run && RUNDIR=/run || RUNDIR=/var/run
@@ -71,14 +71,10 @@ prog=$(basename $DAEMON)
 config=$DEFAULTCONFIG_DAEMON
 OPTS="--mode HTTP -D -P \"$PIDFILE_BROKER\" -b \"$DAEMON_BIND_ADDRESS\""
 
-lockfile=/var/lock/subsys/$prog
+lockfile=/var/lock/subsys/x2gobroker-daemon
 
 start() {
 [ -x $exec ] || exit 5
-	if ps a -u $X2GOBROKER_DAEMON_USER | grep -v grep | grep $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
@@ -92,10 +88,13 @@ start() {
 
 stop() {
 	echo -n $"Stopping $prog: "
+	set +e
 	killproc -p $PIDFILE_BROKER $exec
 	retval=$?
+	set -e
 	echo
 	rm -f $lockfile
+	return $retval
 }
 
 restart() {


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