mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-11 18:11:29 +02:00
Exits cleanly if validation of smb fails
This commit is contained in:
@@ -45,7 +45,8 @@ fi
|
|||||||
chown $(id -u):$(id -g) /92-local_mounts.sh
|
chown $(id -u):$(id -g) /92-local_mounts.sh
|
||||||
chmod a+x /92-local_mounts.sh
|
chmod a+x /92-local_mounts.sh
|
||||||
sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' /92-local_mounts.sh
|
sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' /92-local_mounts.sh
|
||||||
/./92-local_mounts.sh
|
/./92-local_mounts.sh &
|
||||||
|
true # Prevents script crash on failure
|
||||||
|
|
||||||
######################
|
######################
|
||||||
# EXECUTE SMB SCRIPT #
|
# EXECUTE SMB SCRIPT #
|
||||||
@@ -53,7 +54,8 @@ sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' /92-local_mounts.s
|
|||||||
chown $(id -u):$(id -g) /92-smb_mounts.sh
|
chown $(id -u):$(id -g) /92-smb_mounts.sh
|
||||||
chmod a+x /92-smb_mounts.sh
|
chmod a+x /92-smb_mounts.sh
|
||||||
sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' /92-smb_mounts.sh
|
sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' /92-smb_mounts.sh
|
||||||
/./92-smb_mounts.sh
|
/./92-smb_mounts.sh &
|
||||||
|
true # Prevents script crash on failure
|
||||||
|
|
||||||
#################
|
#################
|
||||||
# NGINX SETTING #
|
# NGINX SETTING #
|
||||||
|
|||||||
@@ -13,10 +13,6 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
SMBVERS=""
|
SMBVERS=""
|
||||||
SECVERS=""
|
SECVERS=""
|
||||||
|
|
||||||
# Dont execute if still default
|
|
||||||
[ ${MOREDISKS::1} == "<" ] &&
|
|
||||||
(bashio::log.warning 'The networkdisks option is set, but starts with the letter "<". IF you want to mount an SMB drive, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2' && exit 0)
|
|
||||||
|
|
||||||
# Mount CIFS Share if configured and if Protection Mode is active
|
# Mount CIFS Share if configured and if Protection Mode is active
|
||||||
bashio::log.info 'Mounting smb share(s)...'
|
bashio::log.info 'Mounting smb share(s)...'
|
||||||
|
|
||||||
@@ -36,7 +32,8 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
|
|
||||||
# Data validation
|
# Data validation
|
||||||
if [[ ! $disk =~ ^.*+[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[/]+.*+$ ]]; then
|
if [[ ! $disk =~ ^.*+[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[/]+.*+$ ]]; then
|
||||||
bashio::log.fatal "The structure of your <networkdisks> doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2"
|
bashio::log.fatal "The structure of your \"networkdisks\" option : \"$disk\" doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2. If you don't use it, you can simply remove the text, this will avoid this error message in the future."
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Prepare mount point
|
# Prepare mount point
|
||||||
|
|||||||
@@ -13,10 +13,6 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
SMBVERS=""
|
SMBVERS=""
|
||||||
SECVERS=""
|
SECVERS=""
|
||||||
|
|
||||||
# Dont execute if still default
|
|
||||||
[ ${MOREDISKS::1} == "<" ] &&
|
|
||||||
(bashio::log.warning 'The networkdisks option is set, but starts with the letter "<". IF you want to mount an SMB drive, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2' && exit 0)
|
|
||||||
|
|
||||||
# Mount CIFS Share if configured and if Protection Mode is active
|
# Mount CIFS Share if configured and if Protection Mode is active
|
||||||
bashio::log.info 'Mounting smb share(s)...'
|
bashio::log.info 'Mounting smb share(s)...'
|
||||||
|
|
||||||
@@ -36,7 +32,8 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
|
|
||||||
# Data validation
|
# Data validation
|
||||||
if [[ ! $disk =~ ^.*+[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[/]+.*+$ ]]; then
|
if [[ ! $disk =~ ^.*+[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[/]+.*+$ ]]; then
|
||||||
bashio::log.fatal "The structure of your <networkdisks> doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2"
|
bashio::log.fatal "The structure of your \"networkdisks\" option : \"$disk\" doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2. If you don't use it, you can simply remove the text, this will avoid this error message in the future."
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Prepare mount point
|
# Prepare mount point
|
||||||
|
|||||||
@@ -13,10 +13,6 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
SMBVERS=""
|
SMBVERS=""
|
||||||
SECVERS=""
|
SECVERS=""
|
||||||
|
|
||||||
# Dont execute if still default
|
|
||||||
[ ${MOREDISKS::1} == "<" ] &&
|
|
||||||
(bashio::log.warning 'The networkdisks option is set, but starts with the letter "<". IF you want to mount an SMB drive, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2' && exit 0)
|
|
||||||
|
|
||||||
# Mount CIFS Share if configured and if Protection Mode is active
|
# Mount CIFS Share if configured and if Protection Mode is active
|
||||||
bashio::log.info 'Mounting smb share(s)...'
|
bashio::log.info 'Mounting smb share(s)...'
|
||||||
|
|
||||||
@@ -36,7 +32,8 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
|
|
||||||
# Data validation
|
# Data validation
|
||||||
if [[ ! $disk =~ ^.*+[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[/]+.*+$ ]]; then
|
if [[ ! $disk =~ ^.*+[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[/]+.*+$ ]]; then
|
||||||
bashio::log.fatal "The structure of your <networkdisks> doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2"
|
bashio::log.fatal "The structure of your \"networkdisks\" option : \"$disk\" doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2. If you don't use it, you can simply remove the text, this will avoid this error message in the future."
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Prepare mount point
|
# Prepare mount point
|
||||||
|
|||||||
@@ -45,7 +45,8 @@ fi
|
|||||||
chown $(id -u):$(id -g) /92-local_mounts.sh
|
chown $(id -u):$(id -g) /92-local_mounts.sh
|
||||||
chmod a+x /92-local_mounts.sh
|
chmod a+x /92-local_mounts.sh
|
||||||
sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' /92-local_mounts.sh
|
sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' /92-local_mounts.sh
|
||||||
/./92-local_mounts.sh
|
/./92-local_mounts.sh &
|
||||||
|
true # Prevents script crash on failure
|
||||||
|
|
||||||
######################
|
######################
|
||||||
# EXECUTE SMB SCRIPT #
|
# EXECUTE SMB SCRIPT #
|
||||||
@@ -53,7 +54,8 @@ sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' /92-local_mounts.s
|
|||||||
chown $(id -u):$(id -g) /92-smb_mounts.sh
|
chown $(id -u):$(id -g) /92-smb_mounts.sh
|
||||||
chmod a+x /92-smb_mounts.sh
|
chmod a+x /92-smb_mounts.sh
|
||||||
sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' /92-smb_mounts.sh
|
sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' /92-smb_mounts.sh
|
||||||
/./92-smb_mounts.sh
|
/./92-smb_mounts.sh &
|
||||||
|
true # Prevents script crash on failure
|
||||||
|
|
||||||
###################
|
###################
|
||||||
# SSL CONFIG v1.0 #
|
# SSL CONFIG v1.0 #
|
||||||
|
|||||||
@@ -13,10 +13,6 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
SMBVERS=""
|
SMBVERS=""
|
||||||
SECVERS=""
|
SECVERS=""
|
||||||
|
|
||||||
# Dont execute if still default
|
|
||||||
[ ${MOREDISKS::1} == "<" ] &&
|
|
||||||
(bashio::log.warning 'The networkdisks option is set, but starts with the letter "<". IF you want to mount an SMB drive, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2' && exit 0)
|
|
||||||
|
|
||||||
# Mount CIFS Share if configured and if Protection Mode is active
|
# Mount CIFS Share if configured and if Protection Mode is active
|
||||||
bashio::log.info 'Mounting smb share(s)...'
|
bashio::log.info 'Mounting smb share(s)...'
|
||||||
|
|
||||||
@@ -36,7 +32,8 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
|
|
||||||
# Data validation
|
# Data validation
|
||||||
if [[ ! $disk =~ ^.*+[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[/]+.*+$ ]]; then
|
if [[ ! $disk =~ ^.*+[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[/]+.*+$ ]]; then
|
||||||
bashio::log.fatal "The structure of your <networkdisks> doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2"
|
bashio::log.fatal "The structure of your \"networkdisks\" option : \"$disk\" doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2. If you don't use it, you can simply remove the text, this will avoid this error message in the future."
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Prepare mount point
|
# Prepare mount point
|
||||||
|
|||||||
@@ -13,10 +13,6 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
SMBVERS=""
|
SMBVERS=""
|
||||||
SECVERS=""
|
SECVERS=""
|
||||||
|
|
||||||
# Dont execute if still default
|
|
||||||
[ ${MOREDISKS::1} == "<" ] &&
|
|
||||||
(bashio::log.warning 'The networkdisks option is set, but starts with the letter "<". IF you want to mount an SMB drive, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2' && exit 0)
|
|
||||||
|
|
||||||
# Mount CIFS Share if configured and if Protection Mode is active
|
# Mount CIFS Share if configured and if Protection Mode is active
|
||||||
bashio::log.info 'Mounting smb share(s)...'
|
bashio::log.info 'Mounting smb share(s)...'
|
||||||
|
|
||||||
@@ -36,7 +32,8 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
|
|
||||||
# Data validation
|
# Data validation
|
||||||
if [[ ! $disk =~ ^.*+[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[/]+.*+$ ]]; then
|
if [[ ! $disk =~ ^.*+[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[/]+.*+$ ]]; then
|
||||||
bashio::log.fatal "The structure of your <networkdisks> doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2"
|
bashio::log.fatal "The structure of your \"networkdisks\" option : \"$disk\" doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2. If you don't use it, you can simply remove the text, this will avoid this error message in the future."
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Prepare mount point
|
# Prepare mount point
|
||||||
|
|||||||
@@ -13,10 +13,6 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
SMBVERS=""
|
SMBVERS=""
|
||||||
SECVERS=""
|
SECVERS=""
|
||||||
|
|
||||||
# Dont execute if still default
|
|
||||||
[ ${MOREDISKS::1} == "<" ] &&
|
|
||||||
(bashio::log.warning 'The networkdisks option is set, but starts with the letter "<". IF you want to mount an SMB drive, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2' && exit 0)
|
|
||||||
|
|
||||||
# Mount CIFS Share if configured and if Protection Mode is active
|
# Mount CIFS Share if configured and if Protection Mode is active
|
||||||
bashio::log.info 'Mounting smb share(s)...'
|
bashio::log.info 'Mounting smb share(s)...'
|
||||||
|
|
||||||
@@ -36,7 +32,8 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
|
|
||||||
# Data validation
|
# Data validation
|
||||||
if [[ ! $disk =~ ^.*+[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[/]+.*+$ ]]; then
|
if [[ ! $disk =~ ^.*+[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[/]+.*+$ ]]; then
|
||||||
bashio::log.fatal "The structure of your <networkdisks> doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2"
|
bashio::log.fatal "The structure of your \"networkdisks\" option : \"$disk\" doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2. If you don't use it, you can simply remove the text, this will avoid this error message in the future."
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Prepare mount point
|
# Prepare mount point
|
||||||
|
|||||||
@@ -13,10 +13,6 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
SMBVERS=""
|
SMBVERS=""
|
||||||
SECVERS=""
|
SECVERS=""
|
||||||
|
|
||||||
# Dont execute if still default
|
|
||||||
[ ${MOREDISKS::1} == "<" ] &&
|
|
||||||
(bashio::log.warning 'The networkdisks option is set, but starts with the letter "<". IF you want to mount an SMB drive, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2' && exit 0)
|
|
||||||
|
|
||||||
# Mount CIFS Share if configured and if Protection Mode is active
|
# Mount CIFS Share if configured and if Protection Mode is active
|
||||||
bashio::log.info 'Mounting smb share(s)...'
|
bashio::log.info 'Mounting smb share(s)...'
|
||||||
|
|
||||||
@@ -36,7 +32,8 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
|
|
||||||
# Data validation
|
# Data validation
|
||||||
if [[ ! $disk =~ ^.*+[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[/]+.*+$ ]]; then
|
if [[ ! $disk =~ ^.*+[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[/]+.*+$ ]]; then
|
||||||
bashio::log.fatal "The structure of your <networkdisks> doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2"
|
bashio::log.fatal "The structure of your \"networkdisks\" option : \"$disk\" doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2. If you don't use it, you can simply remove the text, this will avoid this error message in the future."
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Prepare mount point
|
# Prepare mount point
|
||||||
|
|||||||
@@ -13,10 +13,6 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
SMBVERS=""
|
SMBVERS=""
|
||||||
SECVERS=""
|
SECVERS=""
|
||||||
|
|
||||||
# Dont execute if still default
|
|
||||||
[ ${MOREDISKS::1} == "<" ] &&
|
|
||||||
(bashio::log.warning 'The networkdisks option is set, but starts with the letter "<". IF you want to mount an SMB drive, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2' && exit 0)
|
|
||||||
|
|
||||||
# Mount CIFS Share if configured and if Protection Mode is active
|
# Mount CIFS Share if configured and if Protection Mode is active
|
||||||
bashio::log.info 'Mounting smb share(s)...'
|
bashio::log.info 'Mounting smb share(s)...'
|
||||||
|
|
||||||
@@ -36,7 +32,8 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
|
|
||||||
# Data validation
|
# Data validation
|
||||||
if [[ ! $disk =~ ^.*+[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[/]+.*+$ ]]; then
|
if [[ ! $disk =~ ^.*+[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[/]+.*+$ ]]; then
|
||||||
bashio::log.fatal "The structure of your <networkdisks> doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2"
|
bashio::log.fatal "The structure of your \"networkdisks\" option : \"$disk\" doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2. If you don't use it, you can simply remove the text, this will avoid this error message in the future."
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Prepare mount point
|
# Prepare mount point
|
||||||
|
|||||||
@@ -47,7 +47,8 @@ fi
|
|||||||
chown $(id -u):$(id -g) /92-local_mounts.sh
|
chown $(id -u):$(id -g) /92-local_mounts.sh
|
||||||
chmod a+x /92-local_mounts.sh
|
chmod a+x /92-local_mounts.sh
|
||||||
sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' /92-local_mounts.sh
|
sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' /92-local_mounts.sh
|
||||||
/./92-local_mounts.sh
|
/./92-local_mounts.sh &
|
||||||
|
true # Prevents script crash on failure
|
||||||
|
|
||||||
######################
|
######################
|
||||||
# EXECUTE SMB SCRIPT #
|
# EXECUTE SMB SCRIPT #
|
||||||
@@ -55,7 +56,8 @@ sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' /92-local_mounts.s
|
|||||||
chown $(id -u):$(id -g) /92-smb_mounts.sh
|
chown $(id -u):$(id -g) /92-smb_mounts.sh
|
||||||
chmod a+x /92-smb_mounts.sh
|
chmod a+x /92-smb_mounts.sh
|
||||||
sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' /92-smb_mounts.sh
|
sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' /92-smb_mounts.sh
|
||||||
/./92-smb_mounts.sh
|
/./92-smb_mounts.sh &
|
||||||
|
true # Prevents script crash on failure
|
||||||
|
|
||||||
##############
|
##############
|
||||||
# LAUNCH APP #
|
# LAUNCH APP #
|
||||||
|
|||||||
@@ -13,10 +13,6 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
SMBVERS=""
|
SMBVERS=""
|
||||||
SECVERS=""
|
SECVERS=""
|
||||||
|
|
||||||
# Dont execute if still default
|
|
||||||
[ ${MOREDISKS::1} == "<" ] &&
|
|
||||||
(bashio::log.warning 'The networkdisks option is set, but starts with the letter "<". IF you want to mount an SMB drive, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2' && exit 0)
|
|
||||||
|
|
||||||
# Mount CIFS Share if configured and if Protection Mode is active
|
# Mount CIFS Share if configured and if Protection Mode is active
|
||||||
bashio::log.info 'Mounting smb share(s)...'
|
bashio::log.info 'Mounting smb share(s)...'
|
||||||
|
|
||||||
@@ -36,7 +32,8 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
|
|
||||||
# Data validation
|
# Data validation
|
||||||
if [[ ! $disk =~ ^.*+[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[/]+.*+$ ]]; then
|
if [[ ! $disk =~ ^.*+[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[/]+.*+$ ]]; then
|
||||||
bashio::log.fatal "The structure of your <networkdisks> doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2"
|
bashio::log.fatal "The structure of your \"networkdisks\" option : \"$disk\" doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2. If you don't use it, you can simply remove the text, this will avoid this error message in the future."
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Prepare mount point
|
# Prepare mount point
|
||||||
|
|||||||
@@ -13,10 +13,6 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
SMBVERS=""
|
SMBVERS=""
|
||||||
SECVERS=""
|
SECVERS=""
|
||||||
|
|
||||||
# Dont execute if still default
|
|
||||||
[ ${MOREDISKS::1} == "<" ] &&
|
|
||||||
(bashio::log.warning 'The networkdisks option is set, but starts with the letter "<". IF you want to mount an SMB drive, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2' && exit 0)
|
|
||||||
|
|
||||||
# Mount CIFS Share if configured and if Protection Mode is active
|
# Mount CIFS Share if configured and if Protection Mode is active
|
||||||
bashio::log.info 'Mounting smb share(s)...'
|
bashio::log.info 'Mounting smb share(s)...'
|
||||||
|
|
||||||
@@ -36,7 +32,8 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
|
|
||||||
# Data validation
|
# Data validation
|
||||||
if [[ ! $disk =~ ^.*+[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[/]+.*+$ ]]; then
|
if [[ ! $disk =~ ^.*+[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[/]+.*+$ ]]; then
|
||||||
bashio::log.fatal "The structure of your <networkdisks> doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2"
|
bashio::log.fatal "The structure of your \"networkdisks\" option : \"$disk\" doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2. If you don't use it, you can simply remove the text, this will avoid this error message in the future."
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Prepare mount point
|
# Prepare mount point
|
||||||
|
|||||||
@@ -13,10 +13,6 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
SMBVERS=""
|
SMBVERS=""
|
||||||
SECVERS=""
|
SECVERS=""
|
||||||
|
|
||||||
# Dont execute if still default
|
|
||||||
[ ${MOREDISKS::1} == "<" ] &&
|
|
||||||
(bashio::log.warning 'The networkdisks option is set, but starts with the letter "<". IF you want to mount an SMB drive, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2' && exit 0)
|
|
||||||
|
|
||||||
# Mount CIFS Share if configured and if Protection Mode is active
|
# Mount CIFS Share if configured and if Protection Mode is active
|
||||||
bashio::log.info 'Mounting smb share(s)...'
|
bashio::log.info 'Mounting smb share(s)...'
|
||||||
|
|
||||||
@@ -36,7 +32,8 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
|
|
||||||
# Data validation
|
# Data validation
|
||||||
if [[ ! $disk =~ ^.*+[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[/]+.*+$ ]]; then
|
if [[ ! $disk =~ ^.*+[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[/]+.*+$ ]]; then
|
||||||
bashio::log.fatal "The structure of your <networkdisks> doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2"
|
bashio::log.fatal "The structure of your \"networkdisks\" option : \"$disk\" doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2. If you don't use it, you can simply remove the text, this will avoid this error message in the future."
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Prepare mount point
|
# Prepare mount point
|
||||||
|
|||||||
@@ -13,10 +13,6 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
SMBVERS=""
|
SMBVERS=""
|
||||||
SECVERS=""
|
SECVERS=""
|
||||||
|
|
||||||
# Dont execute if still default
|
|
||||||
[ ${MOREDISKS::1} == "<" ] &&
|
|
||||||
(bashio::log.warning 'The networkdisks option is set, but starts with the letter "<". IF you want to mount an SMB drive, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2' && exit 0)
|
|
||||||
|
|
||||||
# Mount CIFS Share if configured and if Protection Mode is active
|
# Mount CIFS Share if configured and if Protection Mode is active
|
||||||
bashio::log.info 'Mounting smb share(s)...'
|
bashio::log.info 'Mounting smb share(s)...'
|
||||||
|
|
||||||
@@ -36,7 +32,8 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
|
|
||||||
# Data validation
|
# Data validation
|
||||||
if [[ ! $disk =~ ^.*+[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[/]+.*+$ ]]; then
|
if [[ ! $disk =~ ^.*+[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[/]+.*+$ ]]; then
|
||||||
bashio::log.fatal "The structure of your <networkdisks> doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2"
|
bashio::log.fatal "The structure of your \"networkdisks\" option : \"$disk\" doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2. If you don't use it, you can simply remove the text, this will avoid this error message in the future."
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Prepare mount point
|
# Prepare mount point
|
||||||
|
|||||||
@@ -13,10 +13,6 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
SMBVERS=""
|
SMBVERS=""
|
||||||
SECVERS=""
|
SECVERS=""
|
||||||
|
|
||||||
# Dont execute if still default
|
|
||||||
[ ${MOREDISKS::1} == "<" ] &&
|
|
||||||
(bashio::log.warning 'The networkdisks option is set, but starts with the letter "<". IF you want to mount an SMB drive, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2' && exit 0)
|
|
||||||
|
|
||||||
# Mount CIFS Share if configured and if Protection Mode is active
|
# Mount CIFS Share if configured and if Protection Mode is active
|
||||||
bashio::log.info 'Mounting smb share(s)...'
|
bashio::log.info 'Mounting smb share(s)...'
|
||||||
|
|
||||||
@@ -36,7 +32,8 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
|
|
||||||
# Data validation
|
# Data validation
|
||||||
if [[ ! $disk =~ ^.*+[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[/]+.*+$ ]]; then
|
if [[ ! $disk =~ ^.*+[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[/]+.*+$ ]]; then
|
||||||
bashio::log.fatal "The structure of your <networkdisks> doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2"
|
bashio::log.fatal "The structure of your \"networkdisks\" option : \"$disk\" doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2. If you don't use it, you can simply remove the text, this will avoid this error message in the future."
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Prepare mount point
|
# Prepare mount point
|
||||||
|
|||||||
@@ -13,10 +13,6 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
SMBVERS=""
|
SMBVERS=""
|
||||||
SECVERS=""
|
SECVERS=""
|
||||||
|
|
||||||
# Dont execute if still default
|
|
||||||
[ ${MOREDISKS::1} == "<" ] &&
|
|
||||||
(bashio::log.warning 'The networkdisks option is set, but starts with the letter "<". IF you want to mount an SMB drive, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2' && exit 0)
|
|
||||||
|
|
||||||
# Mount CIFS Share if configured and if Protection Mode is active
|
# Mount CIFS Share if configured and if Protection Mode is active
|
||||||
bashio::log.info 'Mounting smb share(s)...'
|
bashio::log.info 'Mounting smb share(s)...'
|
||||||
|
|
||||||
@@ -36,7 +32,8 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
|
|
||||||
# Data validation
|
# Data validation
|
||||||
if [[ ! $disk =~ ^.*+[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[/]+.*+$ ]]; then
|
if [[ ! $disk =~ ^.*+[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[/]+.*+$ ]]; then
|
||||||
bashio::log.fatal "The structure of your <networkdisks> doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2"
|
bashio::log.fatal "The structure of your \"networkdisks\" option : \"$disk\" doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2. If you don't use it, you can simply remove the text, this will avoid this error message in the future."
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Prepare mount point
|
# Prepare mount point
|
||||||
|
|||||||
@@ -13,10 +13,6 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
SMBVERS=""
|
SMBVERS=""
|
||||||
SECVERS=""
|
SECVERS=""
|
||||||
|
|
||||||
# Dont execute if still default
|
|
||||||
[ ${MOREDISKS::1} == "<" ] &&
|
|
||||||
(bashio::log.warning 'The networkdisks option is set, but starts with the letter "<". IF you want to mount an SMB drive, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2' && exit 0)
|
|
||||||
|
|
||||||
# Mount CIFS Share if configured and if Protection Mode is active
|
# Mount CIFS Share if configured and if Protection Mode is active
|
||||||
bashio::log.info 'Mounting smb share(s)...'
|
bashio::log.info 'Mounting smb share(s)...'
|
||||||
|
|
||||||
@@ -36,7 +32,8 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
|
|
||||||
# Data validation
|
# Data validation
|
||||||
if [[ ! $disk =~ ^.*+[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[/]+.*+$ ]]; then
|
if [[ ! $disk =~ ^.*+[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[/]+.*+$ ]]; then
|
||||||
bashio::log.fatal "The structure of your <networkdisks> doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2"
|
bashio::log.fatal "The structure of your \"networkdisks\" option : \"$disk\" doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2. If you don't use it, you can simply remove the text, this will avoid this error message in the future."
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Prepare mount point
|
# Prepare mount point
|
||||||
|
|||||||
@@ -13,10 +13,6 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
SMBVERS=""
|
SMBVERS=""
|
||||||
SECVERS=""
|
SECVERS=""
|
||||||
|
|
||||||
# Dont execute if still default
|
|
||||||
[ ${MOREDISKS::1} == "<" ] &&
|
|
||||||
(bashio::log.warning 'The networkdisks option is set, but starts with the letter "<". IF you want to mount an SMB drive, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2' && exit 0)
|
|
||||||
|
|
||||||
# Mount CIFS Share if configured and if Protection Mode is active
|
# Mount CIFS Share if configured and if Protection Mode is active
|
||||||
bashio::log.info 'Mounting smb share(s)...'
|
bashio::log.info 'Mounting smb share(s)...'
|
||||||
|
|
||||||
@@ -36,7 +32,8 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
|
|
||||||
# Data validation
|
# Data validation
|
||||||
if [[ ! $disk =~ ^.*+[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[/]+.*+$ ]]; then
|
if [[ ! $disk =~ ^.*+[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[/]+.*+$ ]]; then
|
||||||
bashio::log.fatal "The structure of your <networkdisks> doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2"
|
bashio::log.fatal "The structure of your \"networkdisks\" option : \"$disk\" doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2. If you don't use it, you can simply remove the text, this will avoid this error message in the future."
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Prepare mount point
|
# Prepare mount point
|
||||||
|
|||||||
@@ -13,10 +13,6 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
SMBVERS=""
|
SMBVERS=""
|
||||||
SECVERS=""
|
SECVERS=""
|
||||||
|
|
||||||
# Dont execute if still default
|
|
||||||
[ ${MOREDISKS::1} == "<" ] &&
|
|
||||||
(bashio::log.warning 'The networkdisks option is set, but starts with the letter "<". IF you want to mount an SMB drive, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2' && exit 0)
|
|
||||||
|
|
||||||
# Mount CIFS Share if configured and if Protection Mode is active
|
# Mount CIFS Share if configured and if Protection Mode is active
|
||||||
bashio::log.info 'Mounting smb share(s)...'
|
bashio::log.info 'Mounting smb share(s)...'
|
||||||
|
|
||||||
@@ -36,7 +32,8 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
|
|
||||||
# Data validation
|
# Data validation
|
||||||
if [[ ! $disk =~ ^.*+[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[/]+.*+$ ]]; then
|
if [[ ! $disk =~ ^.*+[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[/]+.*+$ ]]; then
|
||||||
bashio::log.fatal "The structure of your <networkdisks> doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2"
|
bashio::log.fatal "The structure of your \"networkdisks\" option : \"$disk\" doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2. If you don't use it, you can simply remove the text, this will avoid this error message in the future."
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Prepare mount point
|
# Prepare mount point
|
||||||
|
|||||||
Reference in New Issue
Block a user