From 87a8e4a0ce2a9402fcfa8aaaf66141aca2ac1f05 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 5 Jul 2022 00:43:46 +0800 Subject: [PATCH] up --- scripts/install.sh | 10 ---------- scripts/install/centos.sh | 6 ++---- scripts/install/debian.sh | 2 +- scripts/install/ubuntu.sh | 2 +- scripts/install_cn.sh | 9 --------- scripts/install_dev.sh | 10 ---------- scripts/update.sh | 9 --------- scripts/update/debian.sh | 5 +++++ scripts/update/ubuntu.sh | 4 ++++ scripts/update_cn.sh | 9 --------- scripts/update_dev.sh | 9 --------- 11 files changed, 13 insertions(+), 62 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index 2a0a751a6..91e78049e 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -18,16 +18,6 @@ if [ "$EUID" -ne 0 ] exit fi -if grep -Eq "Ubuntu" /etc/*-release && [ ! -f /bin/sh ]; then - sudo ln -sf /bin/bash /bin/sh - #sudo dpkg-reconfigure dash -fi - -if grep -Eq "Debian" /etc/*-release && [ ! -f /bin/sh ]; then - ln -sf /bin/bash /bin/sh -fi - - if [ ${_os} == "Darwin" ]; then OSNAME='macos' diff --git a/scripts/install/centos.sh b/scripts/install/centos.sh index 5e604ba09..b681f9626 100755 --- a/scripts/install/centos.sh +++ b/scripts/install/centos.sh @@ -64,12 +64,10 @@ if [ ! -f /etc/init.d/iptables ];then sed -i 's#AllowZoneDrifting=yes#AllowZoneDrifting=no#g' /etc/firewalld/firewalld.conf firewall-cmd --reload + #安装时不开启 + systemctl stop firewalld fi - -#安装时不开启 -systemctl stop firewalld - yum groupinstall -y "Development Tools" yum install -y epel-release diff --git a/scripts/install/debian.sh b/scripts/install/debian.sh index aa9449b76..3d36c4ef6 100644 --- a/scripts/install/debian.sh +++ b/scripts/install/debian.sh @@ -12,7 +12,7 @@ LANG=en_US.UTF-8 # WHITE='\e[1;37m' # 白色 # NC='\e[0m' # 没有颜色 -if grep -Eq "Debian" /etc/*-release && [ ! -f /bin/sh ]; then +if grep -Eq "Debian" /etc/*-release; then ln -sf /bin/bash /bin/sh fi diff --git a/scripts/install/ubuntu.sh b/scripts/install/ubuntu.sh index 7b07815e1..ff360fc06 100644 --- a/scripts/install/ubuntu.sh +++ b/scripts/install/ubuntu.sh @@ -3,7 +3,7 @@ PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH LANG=en_US.UTF-8 -if grep -Eq "Ubuntu" /etc/*-release && [ ! -f /bin/sh ]; then +if grep -Eq "Ubuntu" /etc/*-release; then sudo ln -sf /bin/bash /bin/sh #sudo dpkg-reconfigure dash fi diff --git a/scripts/install_cn.sh b/scripts/install_cn.sh index d33c3784f..f6d1fd9d4 100755 --- a/scripts/install_cn.sh +++ b/scripts/install_cn.sh @@ -18,15 +18,6 @@ if [ "$EUID" -ne 0 ] exit fi -if grep -Eq "Ubuntu" /etc/*-release && [ ! -f /bin/sh ]; then - sudo ln -sf /bin/bash /bin/sh - #sudo dpkg-reconfigure dash -fi - -if grep -Eq "Debian" /etc/*-release && [ ! -f /bin/sh ]; then - ln -sf /bin/bash /bin/sh -fi - if [ ${_os} == "Darwin" ]; then diff --git a/scripts/install_dev.sh b/scripts/install_dev.sh index 55b90b224..66ea885cd 100755 --- a/scripts/install_dev.sh +++ b/scripts/install_dev.sh @@ -18,16 +18,6 @@ if [ "$EUID" -ne 0 ] exit fi -if grep -Eq "Ubuntu" /etc/*-release && [ ! -f /bin/sh ]; then - sudo ln -sf /bin/bash /bin/sh - #sudo dpkg-reconfigure dash -fi - -if grep -Eq "Debian" /etc/*-release && [ ! -f /bin/sh ]; then - ln -sf /bin/bash /bin/sh -fi - - if [ ${_os} == "Darwin" ]; then diff --git a/scripts/update.sh b/scripts/update.sh index dcf865fba..dd13727bb 100755 --- a/scripts/update.sh +++ b/scripts/update.sh @@ -14,15 +14,6 @@ if [ "$EUID" -ne 0 ] exit fi -if grep -Eq "Ubuntu" /etc/*-release && [ ! -f /bin/sh ]; then - sudo ln -sf /bin/bash /bin/sh - #sudo dpkg-reconfigure dash -fi - -if grep -Eq "Debian" /etc/*-release && [ ! -f /bin/sh ]; then - ln -sf /bin/bash /bin/sh -fi - if [ ${_os} == "Darwin" ]; then OSNAME='macos' diff --git a/scripts/update/debian.sh b/scripts/update/debian.sh index f82fc8db5..a5a13992a 100644 --- a/scripts/update/debian.sh +++ b/scripts/update/debian.sh @@ -3,6 +3,11 @@ PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH LANG=en_US.UTF-8 +if grep -Eq "Ubuntu" /etc/*-release; then + sudo ln -sf /bin/bash /bin/sh + #sudo dpkg-reconfigure dash +fi + cd /www/server/mdserver-web/scripts && bash lib.sh chmod 755 /www/server/mdserver-web/data diff --git a/scripts/update/ubuntu.sh b/scripts/update/ubuntu.sh index f53954315..827009782 100644 --- a/scripts/update/ubuntu.sh +++ b/scripts/update/ubuntu.sh @@ -3,6 +3,10 @@ PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH LANG=en_US.UTF-8 +if grep -Eq "Ubuntu" /etc/*-release; then + sudo ln -sf /bin/bash /bin/sh + #sudo dpkg-reconfigure dash +fi cd /www/server/mdserver-web/scripts && bash lib.sh diff --git a/scripts/update_cn.sh b/scripts/update_cn.sh index 9924e2a97..f7392d136 100755 --- a/scripts/update_cn.sh +++ b/scripts/update_cn.sh @@ -14,15 +14,6 @@ if [ "$EUID" -ne 0 ] exit fi -if grep -Eq "Ubuntu" /etc/*-release && [ ! -f /bin/sh ]; then - sudo ln -sf /bin/bash /bin/sh - #sudo dpkg-reconfigure dash -fi - -if grep -Eq "Debian" /etc/*-release && [ ! -f /bin/sh ]; then - ln -sf /bin/bash /bin/sh -fi - if [ ${_os} == "Darwin" ]; then diff --git a/scripts/update_dev.sh b/scripts/update_dev.sh index bcc83ca9e..fd9d14b94 100755 --- a/scripts/update_dev.sh +++ b/scripts/update_dev.sh @@ -14,15 +14,6 @@ if [ "$EUID" -ne 0 ] exit fi -if grep -Eq "Ubuntu" /etc/*-release && [ ! -f /bin/sh ]; then - sudo ln -sf /bin/bash /bin/sh - #sudo dpkg-reconfigure dash -fi - -if grep -Eq "Debian" /etc/*-release && [ ! -f /bin/sh ]; then - ln -sf /bin/bash /bin/sh -fi - if [ ${_os} == "Darwin" ]; then OSNAME='macos'