This commit is contained in:
midoks
2022-07-11 20:08:01 +08:00
parent 05938aba4c
commit 949a40ea91
2 changed files with 5 additions and 2 deletions
+2 -1
View File
@@ -103,7 +103,8 @@ def initDreplace():
mw.writeFile(conf, conf_content)
if os.path.exists(systemDir) and not os.path.exists(systemService):
supervisord_bin = mw.execShell('which supervisord')[0].strip()
supervisord_bin = mw.execShell(
'source ' + mw.getServerDir() + '/mdserver-web/bin/activate' + '&& which supervisord')[0].strip()
se_content = mw.readFile(systemServiceTpl)
se_content = se_content.replace('{$SERVER_PATH}', service_path)
se_content = se_content.replace('{$SUP_BIN}', supervisord_bin)
+3 -1
View File
@@ -16,6 +16,9 @@ OSNAME=`cat ${rootPath}/data/osname.pl`
OSNAME_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F "\"" '{print $2}'`
source ${rootPath}/bin/activate
Install_app()
{
echo '正在安装脚本文件...' > $install_tmp
@@ -28,7 +31,6 @@ Install_app()
if [ "centos" == "$OSNAME" ] || [ "fedora" == "$OSNAME" ];then
pip install supervisor
elif [ "ubuntu" == "$OSNAME" ] || [ "debian" == "$OSNAME" ] ;then
pip install supervisor
pip install supervisor
else
pip install supervisor