This commit is contained in:
Mr Chen
2019-01-16 13:54:03 +08:00
parent 879c582e13
commit 0803b7c66b
2 changed files with 13 additions and 6 deletions
+6 -6
View File
@@ -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():
+7
View File
@@ -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