diff options
author | Tobias K <6317548+theCalcaholic@users.noreply.github.com> | 2022-04-28 22:41:03 +0300 |
---|---|---|
committer | Tobias K <6317548+theCalcaholic@users.noreply.github.com> | 2022-04-28 22:41:03 +0300 |
commit | bc13877dc8ea851fd8d0825eeca5c81ad7219e09 (patch) | |
tree | 0dfaf644605aeb335faccfaef6c064add939257a | |
parent | 9663ef7f38ed9dcdf9978e61cb36777dffd8983e (diff) |
ncp-dist-upgrade: Detect availability of bullseye-security package source more robustly
Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>
-rwxr-xr-x | bin/ncp-dist-upgrade | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/ncp-dist-upgrade b/bin/ncp-dist-upgrade index 8b5ae006..d8b30858 100755 --- a/bin/ncp-dist-upgrade +++ b/bin/ncp-dist-upgrade @@ -69,8 +69,8 @@ apt-get dist-upgrade -y # install latest PHP version release_new=$(jq -r '.release' < "${new_cfg}") -# the default repo in bullseye is bullseye-security - except for Raspbian -[[ -f /usr/bin/raspi-config ]] || release_new="${release_new}-security" +# the default repo in bullseye is bullseye-security - use bullseye if it is not available +grep -v '#' /etc/apt/sources.list | grep 'bullseye-security' > /dev/null && release_new="${release_new}-security" php_ver_new=$(jq -r '.php_version' < "${new_cfg}") $APTINSTALL -t ${release_new} php${php_ver_new} php${php_ver_new}-curl php${php_ver_new}-gd php${php_ver_new}-fpm php${php_ver_new}-cli php${php_ver_new}-opcache \ |