Skip to content

Commit

Permalink
update to Debian 11 Bullseye
Browse files Browse the repository at this point in the history
Signed-off-by: nachoparker <nacho@ownyourbits.com>
  • Loading branch information
nachoparker committed Dec 1, 2021
1 parent 5a404c0 commit 2c98302
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 24 deletions.
11 changes: 7 additions & 4 deletions bin/ncp-dist-upgrade
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,15 @@ apt-get purge -y php${PHPVER} php${PHPVER}-curl php${PHPVER}-gd php${PHPVER}-fpm
apt-get purge -y php${PHPVER}-mysql
apt-get purge -y php${PHPVER}-redis
apt-get purge -y php${PHPVER}-exif
apt-get purge -y php${PHPVER}-bcmath
apt-get purge -y php${PHPVER}-gmp
apt-get purge -y php${PHPVER}-imagick
set -e

# update sources
sed -i 's/stretch/buster/g' /etc/apt/sources.list
sed -i 's/stretch/buster/g' /etc/apt/sources.list.d/*
sed -i 's/buster/bullseye/g' /etc/apt/sources.list
sed -i 's/buster/bullseye/g' /etc/apt/sources.list.d/* || true
sed -i 's/bullseye\/updates/bullseye-security/g' /etc/apt/sources.list
rm -f /etc/apt/sources.list.d/php.list

# install latest distro
Expand All @@ -60,12 +63,12 @@ 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 \
php${php_ver_new}-mbstring php${php_ver_new}-xml php${php_ver_new}-zip php${php_ver_new}-fileinfo php${php_ver_new}-ldap \
php${php_ver_new}-intl php${php_ver_new}-bz2 php${php_ver_new}-json
php${php_ver_new}-intl php${php_ver_new}-bz2 php${php_ver_new}-json php${php_ver_new}-bcmath=7.4.25-1+deb11u1 php${php_ver_new}-gmp=7.4.25-1+deb11u1

$APTINSTALL php${php_ver_new}-mysql
$APTINSTALL -t ${release_new} php${php_ver_new}-redis

$APTINSTALL -t ${release_new} php-smbclient exfat-fuse exfat-utils
$APTINSTALL -t ${release_new} smbclient exfat-fuse exfat-utils
$APTINSTALL -t ${release_new} php${php_ver_new}-exif
#$APTINSTALL -t ${release_new} imagemagick php${php_ver_new}-imagick ghostscript

Expand Down
1 change: 0 additions & 1 deletion bin/ncp/CONFIG/nc-datadir.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ install()

configure()
{
source /usr/local/etc/library.sh # sets PHPVER
set -eu -o pipefail

## CHECKS
Expand Down
6 changes: 3 additions & 3 deletions bin/ncp/CONFIG/nc-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ DBADMIN=ncadmin

configure()
{
source /usr/local/etc/library.sh # sets PHPVER NCVER

echo "Setting up a clean Nextcloud instance... wait until message 'NC init done'"

# checks
Expand Down Expand Up @@ -160,7 +158,9 @@ EOF
fi

# ncp-previewgenerator
if is_more_recent_than "21.0.0" "$NCVER"; then
local ncver
ncver="$(ncc status 2>/dev/null | grep "version:" | awk '{ print $3 }')"
if is_more_recent_than "21.0.0" "${ncver}"; then
local ncprev=/var/www/ncp-previewgenerator/ncp-previewgenerator-nc20
else
ncc app:install notify_push
Expand Down
2 changes: 0 additions & 2 deletions bin/ncp/CONFIG/nc-limits.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

configure()
{
source /usr/local/etc/library.sh # sets PHPVER

# Set auto memory limit to 75% of the total memory
local TOTAL_MEM="$( free -b | sed -n 2p | awk '{ print $2 }' )"
AUTOMEM=$(( TOTAL_MEM * 75 / 100 ))
Expand Down
9 changes: 6 additions & 3 deletions bin/ncp/CONFIG/nc-nextcloud.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,13 @@ install()
# Optional packets for Nextcloud and Apps
apt-get update
$APTINSTALL lbzip2 iputils-ping jq wget
$APTINSTALL -t $RELEASE php-smbclient exfat-fuse exfat-utils # for external storage
# NOTE: php-smbclient in sury but not in Debian sources, we'll use the binary version
# https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/external_storage/smb.html
$APTINSTALL -t $RELEASE smbclient exfat-fuse exfat-utils # for external storage
$APTINSTALL -t $RELEASE exfat-fuse exfat-utils # for external storage
$APTINSTALL -t $RELEASE php${PHPVER}-exif # for gallery
$APTINSTALL -t $RELEASE php${PHPVER}-gmp # for bookmarks
$APTINSTALL -t $RELEASE php-bcmath # for LDAP
$APTINSTALL -t $RELEASE php${PHPVER}-bcmath=7.4.25-1+deb11u1 # for LDAP
$APTINSTALL -t $RELEASE php${PHPVER}-gmp=7.4.25-1+deb11u1 # for bookmarks
#$APTINSTALL -t imagemagick php${PHPVER}-imagick ghostscript # for gallery


Expand Down
2 changes: 0 additions & 2 deletions bin/ncp/NETWORKING/nc-static-IP.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
# More at: https://ownyourbits.com
#

source /usr/local/etc/library.sh

configure()
{
local GW="$( ip r | grep "default via" | awk '{ print $3 }' | head -1 )"
Expand Down
1 change: 0 additions & 1 deletion bin/ncp/UPDATES/nc-autoupdate-nc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#

# just change NCLATESTVER and re-activate in update.sh to upgrade users
source /usr/local/etc/library.sh # sets NCLATESTVER

configure()
{
Expand Down
1 change: 0 additions & 1 deletion bin/ncp/UPDATES/nc-update-nextcloud.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
# More at https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/
#

source /usr/local/etc/library.sh # sets NCLATESTVER
LATEST="$NCLATESTVER"

configure()
Expand Down
2 changes: 0 additions & 2 deletions bin/ncp/UPDATES/unattended-upgrades.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ install()

configure()
{
source /usr/local/etc/library.sh # sets RELEASE

[[ $ACTIVE == "yes" ]] && local AUTOUPGRADE=1 || local AUTOUPGRADE=0
[[ $AUTOREBOOT == "yes" ]] && local AUTOREBOOT=true || local AUTOREBOOT=false

Expand Down
4 changes: 2 additions & 2 deletions etc/ncp.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"nextcloud_version": "22.2.2",
"php_version": "7.3",
"release": "buster"
"php_version": "7.4",
"release": "bullseye"
}
2 changes: 0 additions & 2 deletions lamp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
# More at https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/
#

source /usr/local/etc/library.sh # sets PHPVER RELEASE

APTINSTALL="apt-get install -y --no-install-recommends"
export DEBIAN_FRONTEND=noninteractive

Expand Down
1 change: 0 additions & 1 deletion post-inst.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ configure()
pkill -f notify_push

# cleanup all NCP extras
source /usr/local/etc/library.sh
find /usr/local/bin/ncp -name '*.sh' | \
while read script; do cleanup_script $script; done

Expand Down

0 comments on commit 2c98302

Please sign in to comment.