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