From 08b2710976babadaf9d9b62f224742fe5945a963 Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 10 Jun 2022 16:31:44 +0800 Subject: [PATCH] up --- scripts/install.sh | 11 +++++++---- scripts/install/ubuntu.sh | 2 +- scripts/update.sh | 9 +++++---- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index 43373d6b5..d0f457fe2 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -12,6 +12,13 @@ startTime=`date +%s` _os=`uname` echo "use system: ${_os}" + +if grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then + sudo ln -sf /bin/bash /bin/sh + #sudo dpkg-reconfigure dash +fi + + if [ ${_os} == "Darwin" ]; then OSNAME='macos' elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then @@ -27,11 +34,7 @@ elif grep -Eqi "Amazon Linux AMI" /etc/issue || grep -Eq "Amazon Linux AMI" /etc elif grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then OSNAME='debian' elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then - OSNAME='ubuntu' - sudo ln -sf /bin/bash /bin/sh - # sudo dpkg-reconfigure dash - elif grep -Eqi "Raspbian" /etc/issue || grep -Eq "Raspbian" /etc/*-release; then OSNAME='raspbian' elif grep -Eqi "Deepin" /etc/issue || grep -Eq "Deepin" /etc/*-release; then diff --git a/scripts/install/ubuntu.sh b/scripts/install/ubuntu.sh index 628234c3a..458fbbd09 100644 --- a/scripts/install/ubuntu.sh +++ b/scripts/install/ubuntu.sh @@ -39,7 +39,7 @@ fi if [ "${isVersion}" == '' ];then if [ ! -f "/etc/init.d/iptables" ];then - yum install firewalld -y + apt install firewalld systemctl enable firewalld systemctl start firewalld diff --git a/scripts/update.sh b/scripts/update.sh index ef0081938..3dd1f1b19 100755 --- a/scripts/update.sh +++ b/scripts/update.sh @@ -9,6 +9,11 @@ startTime=`date +%s` _os=`uname` echo "use system: ${_os}" +if grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then + sudo ln -sf /bin/bash /bin/sh + #sudo dpkg-reconfigure dash +fi + if [ "${_os}" == "Darwin" ]; then OSNAME='macos' elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then @@ -24,11 +29,7 @@ elif grep -Eqi "Amazon Linux AMI" /etc/issue || grep -Eq "Amazon Linux AMI" /etc elif grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then OSNAME='debian' elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then - OSNAME='ubuntu' - sudo ln -sf /bin/bash /bin/sh - # sudo dpkg-reconfigure dash - elif grep -Eqi "Raspbian" /etc/issue || grep -Eq "Raspbian" /etc/*-release; then OSNAME='raspbian' elif grep -Eqi "Deepin" /etc/issue || grep -Eq "Deepin" /etc/*-release; then