Skip to content

Commit bf1b2ec

Browse files
committed
fix: ensure DKMS kernel module loads correctly on ARM/Ubuntu
Add depmod -a after package installation to rebuild the module dependency cache, which is required for DKMS with compressed modules. Add /etc/modules-load.d/amneziawg.conf to ensure the kernel module is loaded at boot before the awg-quick service starts. This fixes installation issues on Raspberry Pi 4 running Ubuntu 24 where the amneziawg module would fail to load automatically.
1 parent 071f68a commit bf1b2ec

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

amneziawg-install.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,14 @@ function installAmneziaWG() {
625625
dnf install -y amneziawg-dkms amneziawg-tools qrencode iptables
626626
fi
627627

628+
# Rebuild module dependency cache (required for DKMS + compressed modules, especially on ARM/Ubuntu)
629+
depmod -a
630+
631+
# Ensure AmneziaWG kernel module is loaded at boot (before awg-quick service starts)
632+
if [[ ! -f /etc/modules-load.d/amneziawg.conf ]]; then
633+
echo "amneziawg" > /etc/modules-load.d/amneziawg.conf
634+
fi
635+
628636
# Ensure configuration directory exists
629637
mkdir -p "${AMNEZIAWG_DIR}"
630638

0 commit comments

Comments
 (0)