# HG changeset patch # User Jing Zhu # Date 1437424293 25200 # Node ID 77f5d8cbac77f4d55512020aa7341e7eab45f7df # Parent fc6f937103842702cda924d07a7fe93028cb6e7a add functionality to check the version of the current running xena server on the galaxy system diff -r fc6f93710384 -r 77f5d8cbac77 runXena.py --- a/runXena.py Mon Jul 13 14:35:34 2015 -0700 +++ b/runXena.py Mon Jul 20 13:31:33 2015 -0700 @@ -6,7 +6,7 @@ import logging import os import signal -import subprocess +import subprocess, shlex import sys import time import traceback @@ -116,6 +116,15 @@ else: fp.write("Xena VM is not currently running on %s\n" % (hostname)) +elif sys.argv[1] == "version": + # check the current xena status + if xenaIsRunning: + xenaVersionCmd = "java -jar %s --version" % (xena.jarPath()) + args =shlex.split(xenaVersionCmd) + output, error = subprocess.Popen(args, stdout = subprocess.PIPE, stderr= subprocess.PIPE).communicate() + fp.write("The current Xena server version is %s\n" % (output)) + else: + fp.write("Xena Server is not currently running on %s, please start the server first, then you can check the server version.\n" % (hostname)) else: fp.write(("Error: Unexpected command %s" % sys.argv[1])) diff -r fc6f93710384 -r 77f5d8cbac77 xenaAdmin.xml --- a/xenaAdmin.xml Mon Jul 13 14:35:34 2015 -0700 +++ b/xenaAdmin.xml Mon Jul 20 13:31:33 2015 -0700 @@ -1,5 +1,5 @@ - Administer the Galaxy-embedded Xena: start, check status, stop, backup, restore + Administer the Galaxy-embedded Xena: start, check status, stop, check xena version, backup, restore installXena @@ -20,6 +20,7 @@ + @@ -36,6 +37,7 @@ +