From a3004cb762b5e6e187b14e9b6afbca2d2782f067 Mon Sep 17 00:00:00 2001 From: sunny5156 Date: Mon, 17 Dec 2018 13:06:23 +0800 Subject: [PATCH] edit --- config/supervisor/msf.php | 74 ------------------------------ config/supervisor/supervisord.conf | 3 +- 2 files changed, 1 insertion(+), 76 deletions(-) delete mode 100644 config/supervisor/msf.php diff --git a/config/supervisor/msf.php b/config/supervisor/msf.php deleted file mode 100644 index 727f4be..0000000 --- a/config/supervisor/msf.php +++ /dev/null @@ -1,74 +0,0 @@ - - * @copyright Chengdu pinguo Technology Co.,Ltd. - */ -// 服务部署路径 -$wwwPath = '/vue-msf/data/www/'; - -// 服务列表 -$servers = []; -$msfServers = []; - -// 遍历服务部署路径,检查已部署服务是否支持MSF框架 -if ($dh = opendir($wwwPath)) { - while (($file = readdir($dh)) !== false) { - if (strpos($file, '_rollback') !== false) { - continue; - } - if (!empty($servers) && !in_array($file, $servers)) { - continue; - } - - if (is_dir($wwwPath . $file) && file_exists($wwwPath . $file . '/server.php')){ - chmod($wwwPath . $file . '/server.php', 0755); - $name = $file; - if ($name != 'msf-' && strpos($name, 'msf-') === 0) { - $name = substr($name, strlen('msf-')); - } - $msfServers[$name] = $wwwPath . $file . '/server.php'; - } - } - closedir($dh); -} - -// supervisor配置模板 -$conf = << $bin) { - // 创建日志目录 - if (!is_dir('/vue-msf/data/msf-' . $name)) { - mkdir('/vue-msf/data/msf-' . $name, 0777, true); - } - $tmpConf = str_replace('___BIN___', $bin, $conf); - $tmpConf = str_replace('___NAME___', $name, $tmpConf); - $newConfContent .= $tmpConf . "\n"; - } - - file_put_contents('/vue-msf/supervisor/conf.d/msf.conf', $newConfContent); -} \ No newline at end of file diff --git a/config/supervisor/supervisord.conf b/config/supervisor/supervisord.conf index fafe747..d612406 100644 --- a/config/supervisor/supervisord.conf +++ b/config/supervisor/supervisord.conf @@ -4,8 +4,7 @@ logfile_maxbytes = 50MB logfile_backups=10 loglevel = info pidfile = /vue-msf/data/supervisor/run/supervisord.pid -#nodaemon = false -nodaemon = true +nodaemon = fasle minfds = 1024 minprocs = 200 umask = 022