Skip to content

Commit

Permalink
add ubuntu fuse2 check (#514)
Browse files Browse the repository at this point in the history
* add ubuntu fuse2 check
  • Loading branch information
zaneschepke authored Jun 20, 2024
1 parent 063648d commit 7bc368c
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .pkg/installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,32 @@ start_service() {
fi
}

# check for ubuntu version > 22.04 missing required deps
ubuntu_check_fuse2() {
log " ${B_GRN}Checking$RS for distro dependencies"
distro=$(uname -a)
if [[ "$distro" == *"Ubuntu"* ]]; then
need_cmd dpkg
need_cmd grep
fuse_output=$(dpkg --get-selections | grep fuse)
if [[ "$fuse_output" != *"libfuse2"* ]]; then
choice=""
log " ${B_GRN}Install required$RS package libfuse2?"
prompt=" ${B_YLW}Y${RS}es (recommended) ${B_YLW}N${RS}o "
user_prompt choice "$prompt"

if [ "$choice" = "y" ] || [ "$choice" = "Y" ]; then
sudo apt install libfuse2
log " ${B_GRN}Installed$RS libfuse2"
else
log " Installing libfuse2 is required for the application to run properly, please install and try again:
${I_YLW}sudo apt install libfuse2$RS"
exit 1
fi
fi
fi
}

install_client() {
log " ${B_GRN}Installing$RS nymvpn-x.AppImage"
_pushd "$temp_dir"
Expand Down Expand Up @@ -367,6 +393,7 @@ cleanup() {
rm -rf "$temp_dir"
}

need_cmd uname
need_cmd install
need_cmd sudo
need_cmd sed
Expand All @@ -382,6 +409,7 @@ log " nym-vpnd $ITL${B_YLW}$vpnd_version$RS\n"
pre_check
check_install_dir
sanity_check
ubuntu_check_fuse2
download_client
download_daemon
install_client
Expand Down

0 comments on commit 7bc368c

Please sign in to comment.