From 5cf1644bc4ac314d7cf993b3fcbd95c8516add05 Mon Sep 17 00:00:00 2001 From: Maycon Santos Date: Wed, 22 May 2024 19:06:42 +0200 Subject: [PATCH] Configure userspace mode when installing on Synology --- release_files/install.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/release_files/install.sh b/release_files/install.sh index 198d74428..126b4c5c0 100755 --- a/release_files/install.sh +++ b/release_files/install.sh @@ -17,6 +17,7 @@ ARCH="$(uname -m)" PACKAGE_MANAGER="bin" INSTALL_DIR="" SUDO="" +IS_SYNOLOGY="false" if command -v sudo > /dev/null && [ "$(id -u)" -ne 0 ]; then @@ -174,6 +175,15 @@ install_native_binaries() { if ! $SKIP_UI_APP; then download_release_binary "$UI_APP" fi + + if "x-$IS_SYNOLOGY" = "x-true"; then + ${SUDO} mkdir -p /etc/sysconfig + if ${SUDO} grep NB_WG_KERNEL_DISABLED /etc/sysconfig/netbird > /dev/null 2>&1; then + echo "NB_WG_KERNEL_DISABLED already set" + else + echo 'NB_WG_KERNEL_DISABLED=true' | ${SUDO} tee -a /etc/sysconfig/netbird + fi + fi } check_use_bin_variable() { @@ -356,6 +366,7 @@ if type uname >/dev/null 2>&1; then INSTALL_DIR="/usr/local/bin" PACKAGE_MANAGER="bin" SKIP_UI_APP=true + IS_SYNOLOGY="true" else if [ -f /etc/os-release ]; then OS_NAME="$(. /etc/os-release && echo "$ID")"