diff --git a/setup-nasbeery b/setup-nasbeery index 3e1a762..3b3085c 100644 --- a/setup-nasbeery +++ b/setup-nasbeery @@ -127,16 +127,18 @@ apt -qq update echo "Installing samba" DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt -y -qq -o DPkg::options::="--force-confdef" -o DPkg::options::="--force-confold" install -t bullseye-backports acl samba-dsdb-modules samba-vfs-modules samba winbind wsdd zfs-dkms zfsutils-linux zfs-auto-snapshot -if [[ "$(arch)" == "aarch64" ]]; then +ARCH=$(arch) + +if [[ "${ARCH}" == "aarch64" ]] || [[ "${ARCH}" == "riscv64" ]]; then znapzend_version=$(apt search znapzend 2>/dev/null | grep znapzend | cut -d ' ' -f2) wget -O znapzend_${znapzend_version}_amd64.deb https://repo.45drives.com/debian/pool/main/z/znapzend/znapzend_${znapzend_version}_amd64.deb mkdir znapzend dpkg-deb -R znapzend_${znapzend_version}_amd64.deb ./znapzend - sed -i "s/amd64/arm64/g" ./znapzend/DEBIAN/control - sed -i "s/x86_64-linux-gnu/aarch64-linux-gnu/g" znapzend/usr/bin/* - mv znapzend/usr/lib/x86_64-linux-gnu znapzend/usr/lib/aarch64-linux-gnu - dpkg-deb -b znapzend znapzend_${znapzend_version}_arm64.deb - apt install ./znapzend_${znapzend_version}_arm64.deb + sed -i "s/amd64/${ARCH}/g" ./znapzend/DEBIAN/control + sed -i "s/x86_64-linux-gnu/${ARCH}-linux-gnu/g" znapzend/usr/bin/* + mv znapzend/usr/lib/x86_64-linux-gnu znapzend/usr/lib/${ARCH}-linux-gnu + dpkg-deb -b znapzend znapzend_${znapzend_version}_${ARCH}.deb + apt install ./znapzend_${znapzend_version}_${ARCH}.deb systemctl disable znapzend.service rm -r znapzend* fi