mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-17 22:31:49 +02:00
Update 50-mounts
This commit is contained in:
@@ -10,13 +10,13 @@ if bashio::config.has_value 'localdisks'; then
|
|||||||
for disk in $MOREDISKS
|
for disk in $MOREDISKS
|
||||||
do
|
do
|
||||||
bashio::log.info "Mount ${disk}"
|
bashio::log.info "Mount ${disk}"
|
||||||
mkdir -p /mnt/$disk && \
|
mkdir -p /storage/$disk && \
|
||||||
if [ ! -d /mnt/$disk ]; then
|
if [ ! -d /storage/$disk ]; then
|
||||||
echo "Creating /mnt/$disk"
|
echo "Creating /storage/$disk"
|
||||||
mkdir -p /mnt/$disk
|
mkdir -p /storage/$disk
|
||||||
chown -R abc:abc /mnt/$disk
|
chown -R abc:abc /storage/$disk
|
||||||
fi
|
fi
|
||||||
mount -t auto /dev_/disk/by-label/$disk /mnt/$disk -o nosuid,relatime,noexec && \
|
mount -t auto /dev_/disk/by-label/$disk /storage/$disk -o nosuid,relatime,noexec && \
|
||||||
bashio::log.info "Success!"
|
bashio::log.info "Success!"
|
||||||
done || \
|
done || \
|
||||||
bashio::log.warning "Protection mode is ON. Unable to mount local drives!"
|
bashio::log.warning "Protection mode is ON. Unable to mount local drives!"
|
||||||
@@ -32,13 +32,13 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
do
|
do
|
||||||
bashio::log.info "Mount ${disk}"
|
bashio::log.info "Mount ${disk}"
|
||||||
mkdir -p /share/storagecifs && \
|
mkdir -p /share/storagecifs && \
|
||||||
if [ ! -d /mnt/storagecifs ]; then
|
if [ ! -d /storage/storagecifs ]; then
|
||||||
echo "Creating /mnt/storagecifs"
|
echo "Creating /storage/storagecifs"
|
||||||
mkdir -p /mnt/storagecifs
|
mkdir -p /storage/storagecifs
|
||||||
chown -R abc:abc /mnt/storagecifs
|
chown -R abc:abc /storage/storagecifs
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mount -t cifs -o username=$CIFS_USERNAME,password=$CIFS_PASSWORD $disk /mnt/storagecifs && \
|
mount -t cifs -o username=$CIFS_USERNAME,password=$CIFS_PASSWORD $disk /storage/storagecifs && \
|
||||||
bashio::log.info "Success!"
|
bashio::log.info "Success!"
|
||||||
done || \
|
done || \
|
||||||
bashio::log.warning "Protection mode is ON. Unable to mount external drives!"
|
bashio::log.warning "Protection mode is ON. Unable to mount external drives!"
|
||||||
|
|||||||
Reference in New Issue
Block a user