1
0

Update libseccomp2 on any arm32 buster hosts

This commit is contained in:
nicolas.dorier
2021-11-09 11:25:48 +09:00
parent afafca2f26
commit 4eff3f4c1c
3 changed files with 15 additions and 10 deletions

View File

@@ -113,6 +113,19 @@ FIREFLY_HOST=$FIREFLY_HOST" > $BTCPAY_ENV_FILE
env | grep ^BWT_ >> $BTCPAY_ENV_FILE || true
}
docker_update() {
if [[ "$(uname -m)" == "armv7l" ]] && cat "/etc/os-release" 2>/dev/null | grep -q "VERSION_CODENAME=buster" 2>/dev/null; then
if [[ "$(apt list libseccomp2 2>/dev/null)" == *" 2.3"* ]]; then
echo "Outdated version of libseccomp2, updating... (see: https://blog.samcater.com/fix-workaround-rpi4-docker-libseccomp2-docker-20/)"
# https://blog.samcater.com/fix-workaround-rpi4-docker-libseccomp2-docker-20/
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 04EE7237B7D453EC 648ACFD622F3D138
echo 'deb http://httpredir.debian.org/debian buster-backports main contrib non-free' | sudo tee -a /etc/apt/sources.list.d/debian-backports.list
apt update
apt install libseccomp2 -t buster-backports
fi
fi
}
btcpay_up() {
pushd . > /dev/null
cd "$(dirname "$BTCPAY_ENV_FILE")"