From 0803b7c66bbb1b67911b94030d809d1f5b0ece81 Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Wed, 16 Jan 2019 13:54:03 +0800 Subject: [PATCH] update --- plugins/sphinx/index.py | 12 ++++++------ plugins/sphinx/init.d/sphinx.tpl | 7 +++++++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/plugins/sphinx/index.py b/plugins/sphinx/index.py index 96b56e0b7..bd962c8cd 100755 --- a/plugins/sphinx/index.py +++ b/plugins/sphinx/index.py @@ -108,25 +108,25 @@ def initDreplace(): def start(): file = initDreplace() data = public.execShell(file + ' start') - if data[1] == '': + if data[0] == '': return 'ok' - return 'fail' + return data[0] def stop(): file = initDreplace() data = public.execShell(file + ' stop') - if data[1] == '': + if data[0] == '': return 'ok' - return 'fail' + return data[0] def restart(): file = initDreplace() data = public.execShell(file + ' restart') - if data[1] == '': + if data[0] == '': return 'ok' - return 'fail' + return data[0] def reload(): diff --git a/plugins/sphinx/init.d/sphinx.tpl b/plugins/sphinx/init.d/sphinx.tpl index ccf41f0ed..54b54a102 100644 --- a/plugins/sphinx/init.d/sphinx.tpl +++ b/plugins/sphinx/init.d/sphinx.tpl @@ -32,6 +32,10 @@ start () { fi } +rebuild () { + ${APP_PATH}/bin/bin/indexer -c ${APP_CONF} --all --rotate +} + stop () { echo -n $"Stopping $prog: " @@ -66,6 +70,9 @@ case "$1" in restart|reload) restart ;; + rebuild) + rebuild + ;; *) echo $"Usage: $0 {start|stop|status|restart|reload}" exit 1