diff --git a/plugins/ladp/index.html b/plugins/ladp/index.html index 61478d345..9c9e2f2b8 100755 --- a/plugins/ladp/index.html +++ b/plugins/ladp/index.html @@ -15,7 +15,7 @@
自启动
配置修改
-性能调整
+性能调整
运行日志
相关说明
diff --git a/plugins/ladp/index.py b/plugins/ladp/index.py index e1e73fd08..99ef3f7fb 100755 --- a/plugins/ladp/index.py +++ b/plugins/ladp/index.py @@ -110,7 +110,7 @@ def getPidFile(): return tmp.groups()[0].strip() def status(): - pid_file = getPidFile() + pid_file = "/var/run/slapd/slapd.pid" if not os.path.exists(pid_file): return 'stop' @@ -179,7 +179,7 @@ def initDreplace(): return file_bin -def redisOp(method): +def ladpOp(method): file = initDreplace() current_os = mw.getOs() @@ -190,27 +190,27 @@ def redisOp(method): return data[1] if current_os.startswith("freebsd"): - data = mw.execShell('service ' + getPluginName() + ' ' + method) + data = mw.execShell('service slapd ' + method) if data[1] == '': return 'ok' return data[1] - data = mw.execShell('systemctl ' + method + ' ' + getPluginName()) + data = mw.execShell('systemctl ' + method + ' slapd') if data[1] == '': return 'ok' return data[1] def start(): - return redisOp('start') + return ladpOp('start') def stop(): - return redisOp('stop') + return ladpOp('stop') def restart(): - status = redisOp('restart') + status = ladpOp('restart') log_file = runLog() mw.execShell("echo '' > " + log_file) @@ -218,7 +218,7 @@ def restart(): def reload(): - return redisOp('reload') + return ladpOp('reload') def getPort(): diff --git a/plugins/ladp/install.sh b/plugins/ladp/install.sh index cfa135d1d..a4e6d20e7 100755 --- a/plugins/ladp/install.sh +++ b/plugins/ladp/install.sh @@ -7,6 +7,8 @@ rootPath=$(dirname "$curPath") rootPath=$(dirname "$rootPath") serverPath=$(dirname "$rootPath") +sysName=`uname` +sysArch=`arch` VERSION=$2 diff --git a/plugins/ladp/js/ladp.js b/plugins/ladp/js/ladp.js index 71125a793..232f9c323 100755 --- a/plugins/ladp/js/ladp.js +++ b/plugins/ladp/js/ladp.js @@ -54,7 +54,7 @@ function ladpPostCallbak(method, version, args,callback){ } //配置修改 -function getRedisConfig(version) { +function getLadpConfig(version) { ladpPost('get_redis_conf', version,'',function(data){ // console.log(data); var rdata = $.parseJSON(data.data);