From c79c2bf30f552945b6db9323e78ef44d16b90376 Mon Sep 17 00:00:00 2001 From: Alberto Di Meglio Date: Mon, 21 Mar 2005 16:22:25 +0000 Subject: [PATCH] Implemented status method --- org.glite.deployment.lb/CHANGELOG | 5 ++++- .../config/scripts/glite-lb-config.py | 22 ++++++++++++++++++---- org.glite.deployment.lb/project/version.properties | 2 +- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/org.glite.deployment.lb/CHANGELOG b/org.glite.deployment.lb/CHANGELOG index 7e1e349..e14ac8a 100644 --- a/org.glite.deployment.lb/CHANGELOG +++ b/org.glite.deployment.lb/CHANGELOG @@ -1,5 +1,8 @@ +DATE: 21-03-2005 17:21 +[dimeglio] Implemented status method + DATE: 21-03-2005 00:32 -[gdiez] Added PERL5LIB env var +[dimeglio] Added PERL5LIB env var DATE: 17-03-2005 17:33 [gdiez] Stopping and starting the database before the index creation (just after the database is created and the user granted) diff --git a/org.glite.deployment.lb/config/scripts/glite-lb-config.py b/org.glite.deployment.lb/config/scripts/glite-lb-config.py index dd0b297..1721ac0 100644 --- a/org.glite.deployment.lb/config/scripts/glite-lb-config.py +++ b/org.glite.deployment.lb/config/scripts/glite-lb-config.py @@ -6,7 +6,7 @@ # For license conditions see the license file or http://eu-egee.org/license.html # ################################################################################ -# glite-lb-config v. 1.2.1 +# glite-lb-config v. 1.2.2 # # Post-installation script for configuring the gLite Logging and Bookkeping Server # Robert Harakaly < robert.harakaly@cern.ch > @@ -42,7 +42,7 @@ class glite_lb: def __init__(self): self.mysql = MySQL.Mysql() self.verbose = 0 - self.version = "1.2.1" + self.version = "1.2.2" self.name = "glite-lb" self.friendly_name = "gLite Logging and Bookkeeping" @@ -194,6 +194,20 @@ python %s-config [OPTION...]""" % (self.name, os.environ['GLITE_LOCATION'], \ return 0 + def status(self): + + error_level = 0 + + retval = self.mysql.stop() + if retval != 0: + error_level = retval + + retval = os.system('%s/etc/init.d/glite-lb-bkserverd status' % os.environ['GLITE_LOCATION']) + if retval != 0: + error_level = retval + + return 0 + def configure(self): # Create the GLITE_USER if it doesn't exists @@ -414,8 +428,8 @@ if __name__ == '__main__': service.start() sys.exit(0) if o == "--status": - print "Not yet implemented" - sys.exit(1) + sys.exit(service.start()) + # Check certificates if params.has_key('glite.installer.checkcerts'): diff --git a/org.glite.deployment.lb/project/version.properties b/org.glite.deployment.lb/project/version.properties index f84e92c..4e52c78 100644 --- a/org.glite.deployment.lb/project/version.properties +++ b/org.glite.deployment.lb/project/version.properties @@ -1,4 +1,4 @@ -module.version = 1.2.1 +module.version = 1.2.2 module.age = 1 \ No newline at end of file -- 1.8.2.3