diff --git a/plugins/mysql/index.py b/plugins/mysql/index.py index da64c8a4b..b4da93282 100755 --- a/plugins/mysql/index.py +++ b/plugins/mysql/index.py @@ -9,6 +9,41 @@ sys.path.append(os.getcwd() + "/class/core") import public +def getPluginName(): + return 'mysql' + + +def getPluginDir(): + return public.getPluginDir() + '/' + getPluginName() + + +def getServerDir(): + return public.getServerDir() + '/' + getPluginName() + + +def getInitDFile(): + if app_debug: + return '/tmp/' + getPluginName() + return '/etc/init.d/' + getPluginName() + + +def getArgs(): + args = sys.argv[2:] + tmp = {} + args_len = len(args) + + if args_len == 1: + t = args[0].strip('{').strip('}') + t = t.split(':') + tmp[t[0]] = t[1] + elif args_len > 1: + for i in range(len(args)): + t = args[i].split(':') + tmp[t[0]] = t[1] + + return tmp + + def checkMyCnf(): # 处理MySQL配置文件 import os