From 4e146f04e2d250f4e02f030d2c3d00a1f52cbefb Mon Sep 17 00:00:00 2001 From: dbs Date: Sun, 14 Nov 2010 04:15:24 +0000 Subject: [PATCH] Limit list of Python services to those within the domain-specific activeapps section Fix up help with correct default PID directory and document list_all action git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2077 9efc2488-bf62-4759-914b-345cdb29e865 --- src/python/opensrf.py.in | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/python/opensrf.py.in b/src/python/opensrf.py.in index 9019b1c..cbfdbb7 100755 --- a/src/python/opensrf.py.in +++ b/src/python/opensrf.py.in @@ -36,6 +36,7 @@ def do_help(): Options: -a + list_all -- List all services start -- Start a service stop -- stop a service restart -- restart a service @@ -53,7 +54,7 @@ def do_help(): The OpenSRF config file context -p - The location of application PID files. Default is /tmp + The location of application PID files. Default is @PID_DIR@/run/opensrf -d If set, run in daemon (background) mode. This creates a PID @@ -94,13 +95,13 @@ def do_init(): osrf.set.load(domain) settings = osrf.set.get('apps') + activeapps = osrf.set.get('activeapps') - for key in settings.keys(): + for key in (set(settings.keys()) & set(activeapps['appname'])): svc = settings[key] if isinstance(svc, dict) and 'language' in svc and svc['language'] == 'python': services[key] = svc - def do_start(service): ''' Start the named Python service -- 2.43.2