From d23e28ff1899cf4d9058b60803f98283c7f6bc56 Mon Sep 17 00:00:00 2001 From: jose <627622230@qq.com> Date: Wed, 26 Jun 2019 18:26:16 +0800 Subject: [PATCH] Fixed an issue where the node was not automatically selected when installing the plugin --- class/panelPlugin.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/class/panelPlugin.py b/class/panelPlugin.py index df45e0a8..e90a4958 100644 --- a/class/panelPlugin.py +++ b/class/panelPlugin.py @@ -156,14 +156,12 @@ class panelPlugin: if not os.path.exists(tmp_path): os.makedirs(tmp_path,mode=384); toFile = tmp_path + '/' + pluginInfo['name'] + '.zip' public.downloadFile('http://www.bt.cn/api/Pluginother/get_file?fname=' + pluginInfo['versions'][0]['download'],toFile) - if public.FileMd5(toFile) != pluginInfo['versions'][0]['md5']: return public.returnMsg(False,'CHECK_FILE_HASH') update = False; if os.path.exists(pluginInfo['install_checks']): update =pluginInfo['versions'][0]['version_msg'] return self.update_zip(None,toFile,update); else: - if not 'download_url' in session: session['download_url'] = 'http://download.bt.cn'; - download_url = session['download_url'] + '/install/plugin/' + pluginInfo['name'] + '/install.sh'; + download_url = public.get_url() + '/install/plugin/' + pluginInfo['name'] + '/install.sh'; toFile = '/tmp/%s.sh' % pluginInfo['name'] public.downloadFile(download_url,toFile); os.system('/bin/bash ' + toFile + ' install > /tmp/panelShell.pl'); @@ -604,8 +602,9 @@ class panelPlugin: self.get_icon(softInfo['name']) if softInfo['name'].find('php-') != -1: v2= softInfo['versions'][0]['m_version'].replace('.','') - softInfo['fpm'] = os.path.exists('/etc/init.d/php-fpm-' + v2) + softInfo['fpm'] = os.path.exists('/www/server/php/' + v2 + '/sbin/php-fpm') softInfo['status'] = os.path.exists('/tmp/php-cgi-'+v2+'.sock') + if not softInfo['fpm']: softInfo['status'] = True if softInfo['name'] == 'mysql': softInfo['status'] = self.process_exists('mysqld') if softInfo['name'] == 'phpmyadmin': softInfo['status'] = self.get_phpmyadmin_stat() return softInfo