diff --git a/scripts/install_centos.sh b/scripts/install_centos.sh index 5891a1632..bc9f7632b 100755 --- a/scripts/install_centos.sh +++ b/scripts/install_centos.sh @@ -26,7 +26,7 @@ if [ ! -f /root/.acme.sh ];then curl https://get.acme.sh | sh fi -if [ -f "/etc/init.d/iptables" ];then +if [ -f /etc/init.d/iptables ];then iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT diff --git a/scripts/update_centos.sh b/scripts/update_centos.sh index a511186a7..35e6b6aa8 100755 --- a/scripts/update_centos.sh +++ b/scripts/update_centos.sh @@ -26,9 +26,14 @@ chmod 755 /www/server/mdserver-web/data #venv cd /www/server/mdserver-web && python3 -m venv . +if [ ! -f /usr/local/bin/pip3 ];then + python3 -m pip install --upgrade pip setuptools wheel -i https://mirrors.aliyun.com/pypi/simple +fi + if [ -f /www/server/mdserver-web/bin/activate ];then cd /www/server/mdserver-web && source /www/server/mdserver-web/bin/activate && pip3 install -r /www/server/mdserver-web/requirements.txt else + cd /www/server/mdserver-web && pip3 install -r /www/server/mdserver-web/requirements.txt fi