diff --git a/scripts/install.sh b/scripts/install.sh index 9605304f1..5ef876401 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -4,6 +4,12 @@ export PATH # LANG=en_US.UTF-8 is64bit=`getconf LONG_BIT` +if [ -f /www/server/mdserver-web/tool.py ];then + echo -e "存在旧版代码,不能安装!,已知风险的情况下" + echo -e "rm -rf /www/server/mdserver-web" + echo -e "可安装!" +fi + LOG_FILE=/var/log/mw-install.log { diff --git a/scripts/install_dev.sh b/scripts/install_dev.sh index 608a2d556..744091cf7 100755 --- a/scripts/install_dev.sh +++ b/scripts/install_dev.sh @@ -4,6 +4,13 @@ export PATH # LANG=en_US.UTF-8 is64bit=`getconf LONG_BIT` +if [ -f /www/server/mdserver-web/tool.py ];then + echo -e "存在旧版代码,不能安装!,已知风险的情况下" + echo -e "rm -rf /www/server/mdserver-web" + echo -e "可安装!" +fi + + echo -e "您正在安装的是\033[31mmdserver-web测试版\033[0m,非开发测试用途请使用正式版 install.sh !" echo -e "You are installing\033[31m mdserver-web dev version\033[0m, normally use install.sh for production.\n" sleep 1 diff --git a/scripts/update.sh b/scripts/update.sh index ecf7ae0bb..8d7c12d69 100755 --- a/scripts/update.sh +++ b/scripts/update.sh @@ -6,6 +6,13 @@ is64bit=`getconf LONG_BIT` startTime=`date +%s` +if [ -f /www/server/mdserver-web/tool.py ];then + echo -e "存在旧版代码,不能安装!,已知风险的情况下" + echo -e "rm -rf /www/server/mdserver-web" + echo -e "可安装!" +fi + + _os=`uname` echo "use system: ${_os}" diff --git a/scripts/update_dev.sh b/scripts/update_dev.sh index 7c4d2ebd6..dc7deb71a 100755 --- a/scripts/update_dev.sh +++ b/scripts/update_dev.sh @@ -6,6 +6,12 @@ is64bit=`getconf LONG_BIT` startTime=`date +%s` +if [ -f /www/server/mdserver-web/tool.py ];then + echo -e "存在旧版代码,不能安装!,已知风险的情况下" + echo -e "rm -rf /www/server/mdserver-web" + echo -e "可安装!" +fi + _os=`uname` echo "use system: ${_os}"