diff --git a/scripts/install/ubuntu.sh b/scripts/install/ubuntu.sh index 0e143a4cf..8defa90b2 100644 --- a/scripts/install/ubuntu.sh +++ b/scripts/install/ubuntu.sh @@ -64,6 +64,25 @@ cd /www/server/mdserver-web/scripts && bash lib.sh chmod 755 /www/server/mdserver-web/data +VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F "\"" '{print $2}'` + + +if [ "${VERSION_ID}" == "22.04" ];then + pip3 install -U --force-reinstall --no-binary :all: gevent +fi + +if [ ! -f /www/server/mdserver-web/bin/activate ];then + cd /www/server/mdserver-web && python3 -m venv . + cd /www/server/mdserver-web && source /www/server/mdserver-web/bin/activate +else + cd /www/server/mdserver-web && source /www/server/mdserver-web/bin/activate +fi + +if [ "${VERSION_ID}" == "22.04" ];then + pip3 install -U --force-reinstall --no-binary :all: gevent +fi + + cd /www/server/mdserver-web && ./cli.sh start isStart=`ps -ef|grep 'gunicorn -c setting.py app:app' |grep -v grep|awk '{print $2}'` diff --git a/scripts/lib.sh b/scripts/lib.sh index f4ee7c559..32a89a3ba 100755 --- a/scripts/lib.sh +++ b/scripts/lib.sh @@ -360,9 +360,9 @@ pip3 install psutil pip3 install flask-socketio==5.2.0 pip3 install mysqlclient -if [ "${OSNAME}" == "ubuntu" ] && [ "${VERSION_ID}" == "22.04" ];then - pip3 install -U --force-reinstall --no-binary :all: gevent -fi +# if [ "${OSNAME}" == "ubuntu" ] && [ "${VERSION_ID}" == "22.04" ];then +# pip3 install -U --force-reinstall --no-binary :all: gevent +# fi if [ ! -f /www/server/mdserver-web/bin/activate ];then cd /www/server/mdserver-web && python3 -m venv . @@ -384,9 +384,9 @@ pip3 install psutil pip3 install flask-socketio==5.2.0 pip3 install mysqlclient -if [ "${OSNAME}" == "ubuntu" ] && [ "${VERSION_ID}" == "22.04" ];then - pip3 install -U --force-reinstall --no-binary :all: gevent -fi +# if [ "${OSNAME}" == "ubuntu" ] && [ "${VERSION_ID}" == "22.04" ];then +# pip3 install -U --force-reinstall --no-binary :all: gevent +# fi ##### common start #####