fix bluetooth rm

This commit is contained in:
Alexander 2024-02-24 17:31:23 +01:00
parent 9f42ef43b6
commit 5841f8fa1a
2 changed files with 5 additions and 19 deletions

View file

@ -35,24 +35,10 @@ folders=(
"usr/share/alsa/alsa.conf.d/20-bluealsa.conf"
)
# Remove the folders and files
# Check if folder or file and remove it
# Remove everything in the array using -rf
for folder in "${folders[@]}"; do
if [ -d "$ROOTFS_DIR/$folder" ]; then
echo "Removing folder: $ROOTFS_DIR/$folder"
rm -rf "$ROOTFS_DIR/$folder"
if [ $? -ne 0 ]; then
echo -e "${RED}ERROR: Failed to remove folder: $ROOTFS_DIR/$folder ${NC}"
exit 3
fi
elif [ -f "$ROOTFS_DIR/$folder" ]; then
echo "Removing file: $ROOTFS_DIR/$folder"
rm -f "$ROOTFS_DIR/$folder"
if [ $? -ne 0 ]; then
echo -e "${RED}ERROR: Failed to remove file: $ROOTFS_DIR/$folder ${NC}"
exit 3
fi
fi
echo -e "${YELLOW}INFO: Removing the $ROOTFS_DIR/$folder ...${NC}"
rm -rf $ROOTFS_DIR/$folder
done
echo -e "${GREEN}SUCCESS: The 'bluetooth' has been removed ${NC}"
echo -e "${GREEN}INFO: The bluetooth option has been removed${NC}"

View file

@ -76,7 +76,7 @@ kobra_unleashed="localhost.mr-a.de"
# Delete the Bluetooth support because it's not used by Kobra Unleashed
# and can't be used since we replace mqtt anyways.
# bluetooth="default"
bluetooth="default"
# Patch the app to check the captive portal URLs less often (originally every 2s)
# It is used to detect if the internet connection is established and alive