Skip to content

Commit

Permalink
Update 00-local_mounts.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbelgium authored Sep 26, 2023
1 parent cdd4bd3 commit d286bad
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions .templates/00-local_mounts.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash

#################
# INSTALL TOOLS #
#################

# Install lsblk
if ! command -v "lsblk" &>/dev/null; then
if command -v "apk" &>/dev/null; then apk add --no-cache lsblk >/dev/null; fi
if command -v "apt" &>/dev/null; then apt-get update && apt-get install -yqq util-linux; fi
fi

####################
# LIST LOCAL DISKS #
####################
Expand Down Expand Up @@ -54,12 +64,6 @@ if bashio::config.has_value 'localdisks'; then
chown "$PUID:$PGID" /mnt/"$disk"
fi

# Install lsblk
if ! command -v "lsblk" &>/dev/null; then
if command -v "apk" &>/dev/null; then apk add --no-cache lsblk >/dev/null; fi
if command -v "apt" &>/dev/null; then apt-get update && apt-get install -yqq util-linux; fi
fi

# Check FS type and set relative options (thanks @https://github.com/dianlight/hassio-addons)
fstype=$(lsblk "$devpath"/"$disk" -no fstype)
options="nosuid,relatime,noexec"
Expand Down

0 comments on commit d286bad

Please sign in to comment.