correction of smb script

This commit is contained in:
Alexandre
2021-10-23 16:04:59 +02:00
parent 2e19649738
commit 9f567e7939
18 changed files with 20 additions and 20 deletions

View File

@@ -34,7 +34,7 @@ if bashio::config.has_value 'networkdisks'; then
diskname=${diskname##*/} # Get only last part of the name diskname=${diskname##*/} # Get only last part of the name
# Data validation # Data validation
if [[ ! $ip =~ ^.*+[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> doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2"
exit 1 exit 1
fi fi

View File

@@ -98,7 +98,7 @@ if bashio::config.has_value 'networkdisks'; then
diskname=${diskname##*/} # Get only last part of the name diskname=${diskname##*/} # Get only last part of the name
# Data validation # Data validation
if [[ ! $ip =~ ^.*+[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> doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2"
exit 1 exit 1
fi fi

View File

@@ -34,7 +34,7 @@ if bashio::config.has_value 'networkdisks'; then
diskname=${diskname##*/} # Get only last part of the name diskname=${diskname##*/} # Get only last part of the name
# Data validation # Data validation
if [[ ! $ip =~ ^.*+[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> doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2"
exit 1 exit 1
fi fi

View File

@@ -34,7 +34,7 @@ if bashio::config.has_value 'networkdisks'; then
diskname=${diskname##*/} # Get only last part of the name diskname=${diskname##*/} # Get only last part of the name
# Data validation # Data validation
if [[ ! $ip =~ ^.*+[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> doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2"
exit 1 exit 1
fi fi

View File

@@ -34,7 +34,7 @@ if bashio::config.has_value 'networkdisks'; then
diskname=${diskname##*/} # Get only last part of the name diskname=${diskname##*/} # Get only last part of the name
# Data validation # Data validation
if [[ ! $ip =~ ^.*+[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> doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2"
exit 1 exit 1
fi fi

View File

@@ -63,9 +63,9 @@ if bashio::config.has_value 'localdisks'; then
bashio::log.warning "Protection mode is ON. Unable to mount local drives!" bashio::log.warning "Protection mode is ON. Unable to mount local drives!"
fi || true fi || true
######################### ######################
# MOUNT SMB SHARES v1.6 # # EXECUTE SMB SCRIPT #
######################### ######################
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
/./92-smb_mounts.sh /./92-smb_mounts.sh

View File

@@ -34,7 +34,7 @@ if bashio::config.has_value 'networkdisks'; then
diskname=${diskname##*/} # Get only last part of the name diskname=${diskname##*/} # Get only last part of the name
# Data validation # Data validation
if [[ ! $ip =~ ^.*+[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> doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2"
exit 1 exit 1
fi fi

View File

@@ -34,7 +34,7 @@ if bashio::config.has_value 'networkdisks'; then
diskname=${diskname##*/} # Get only last part of the name diskname=${diskname##*/} # Get only last part of the name
# Data validation # Data validation
if [[ ! $ip =~ ^.*+[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> doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2"
exit 1 exit 1
fi fi

View File

@@ -34,7 +34,7 @@ if bashio::config.has_value 'networkdisks'; then
diskname=${diskname##*/} # Get only last part of the name diskname=${diskname##*/} # Get only last part of the name
# Data validation # Data validation
if [[ ! $ip =~ ^.*+[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> doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2"
exit 1 exit 1
fi fi

View File

@@ -99,7 +99,7 @@ if bashio::config.has_value 'networkdisks'; then
diskname=${diskname##*/} # Get only last part of the name diskname=${diskname##*/} # Get only last part of the name
# Data validation # Data validation
if [[ ! $ip =~ ^.*+[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> doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2"
exit 1 exit 1
fi fi

View File

@@ -34,7 +34,7 @@ if bashio::config.has_value 'networkdisks'; then
diskname=${diskname##*/} # Get only last part of the name diskname=${diskname##*/} # Get only last part of the name
# Data validation # Data validation
if [[ ! $ip =~ ^.*+[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> doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2"
exit 1 exit 1
fi fi

View File

@@ -34,7 +34,7 @@ if bashio::config.has_value 'networkdisks'; then
diskname=${diskname##*/} # Get only last part of the name diskname=${diskname##*/} # Get only last part of the name
# Data validation # Data validation
if [[ ! $ip =~ ^.*+[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> doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2"
exit 1 exit 1
fi fi

View File

@@ -34,7 +34,7 @@ if bashio::config.has_value 'networkdisks'; then
diskname=${diskname##*/} # Get only last part of the name diskname=${diskname##*/} # Get only last part of the name
# Data validation # Data validation
if [[ ! $ip =~ ^.*+[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> doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2"
exit 1 exit 1
fi fi

View File

@@ -34,7 +34,7 @@ if bashio::config.has_value 'networkdisks'; then
diskname=${diskname##*/} # Get only last part of the name diskname=${diskname##*/} # Get only last part of the name
# Data validation # Data validation
if [[ ! $ip =~ ^.*+[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> doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2"
exit 1 exit 1
fi fi

View File

@@ -34,7 +34,7 @@ if bashio::config.has_value 'networkdisks'; then
diskname=${diskname##*/} # Get only last part of the name diskname=${diskname##*/} # Get only last part of the name
# Data validation # Data validation
if [[ ! $ip =~ ^.*+[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> doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2"
exit 1 exit 1
fi fi

View File

@@ -34,7 +34,7 @@ if bashio::config.has_value 'networkdisks'; then
diskname=${diskname##*/} # Get only last part of the name diskname=${diskname##*/} # Get only last part of the name
# Data validation # Data validation
if [[ ! $ip =~ ^.*+[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> doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2"
exit 1 exit 1
fi fi

View File

@@ -34,7 +34,7 @@ if bashio::config.has_value 'networkdisks'; then
diskname=${diskname##*/} # Get only last part of the name diskname=${diskname##*/} # Get only last part of the name
# Data validation # Data validation
if [[ ! $ip =~ ^.*+[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> doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2"
exit 1 exit 1
fi fi

View File

@@ -34,7 +34,7 @@ if bashio::config.has_value 'networkdisks'; then
diskname=${diskname##*/} # Get only last part of the name diskname=${diskname##*/} # Get only last part of the name
# Data validation # Data validation
if [[ ! $ip =~ ^.*+[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> doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2"
exit 1 exit 1
fi fi