diff --git a/plugins/php-apt/install.sh b/plugins/php-apt/install.sh index 7b7105d82..34b8a99eb 100755 --- a/plugins/php-apt/install.sh +++ b/plugins/php-apt/install.sh @@ -46,15 +46,17 @@ fi if [ "$OSNAME" == "ubuntu" ];then - echo "y" | LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php && apt update -y + find_source=`ls /etc/apt/sources.list.d | grep ondrej-ubuntu-php` + if [ "$find_source" == "" ];then + echo "y" | LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php && apt update -y + fi fi # apt install $(grep-aptavail -S PHP-defaults -s Package -n) if [ ! -f /etc/apt/sources.list.d/php.list ] && [ "$OSNAME" == "debian" ];then # install php source - apt update -y - apt -y install apt-transport-https lsb-release ca-certificates curl + apt install -y apt-transport-https lsb-release ca-certificates curl cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"") if [ ! -z "$cn" ];then curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://mirror.sjtu.edu.cn/sury/php/apt.gpg diff --git a/scripts/install/ubuntu.sh b/scripts/install/ubuntu.sh index 2676c355a..33c677fa9 100644 --- a/scripts/install/ubuntu.sh +++ b/scripts/install/ubuntu.sh @@ -24,6 +24,7 @@ apt install -y cron apt install -y net-tools apt install -y libncurses5 apt install -y libncurses5-dev +apt install -y software-properties-common apt install -y locate locale-gen en_US.UTF-8