Implemented status method
authorAlberto Di Meglio <alberto.di.meglio@cern.ch>
Mon, 21 Mar 2005 16:22:25 +0000 (16:22 +0000)
committerAlberto Di Meglio <alberto.di.meglio@cern.ch>
Mon, 21 Mar 2005 16:22:25 +0000 (16:22 +0000)
org.glite.deployment.lb/CHANGELOG
org.glite.deployment.lb/config/scripts/glite-lb-config.py
org.glite.deployment.lb/project/version.properties

index 7e1e349..e14ac8a 100644 (file)
@@ -1,5 +1,8 @@
+DATE: 21-03-2005 17:21\r
+[dimeglio] Implemented status method\r
+\r
 DATE: 21-03-2005 00:32\r
-[gdiez] Added PERL5LIB env var\r
+[dimeglio] Added PERL5LIB env var\r
 \r
 DATE: 17-03-2005 17:33\r
 [gdiez] Stopping and starting the database before the index creation (just after the database is created and the user granted)\r
index dd0b297..1721ac0 100644 (file)
@@ -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'):
index f84e92c..4e52c78 100644 (file)
@@ -1,4 +1,4 @@
 
-module.version = 1.2.1
+module.version = 1.2.2
 module.age = 1
                                
\ No newline at end of file