mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-14 19:41:31 +02:00
break, not exit
This commit is contained in:
@@ -55,14 +55,15 @@ 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\" 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."
|
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
|
break
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Does server exists
|
# Does server exists
|
||||||
server="$(echo "$disk" | grep -E -o "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+")"
|
server="$(echo "$disk" | grep -E -o "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+")"
|
||||||
if [ -f /usr/bin/ping ]; then
|
if [ -f /usr/bin/ping ]; then
|
||||||
ping "$server" >/dev/null || \
|
ping "$server" >/dev/null || \
|
||||||
bashio::log.fatal "Your server $server from $disk doesn't ping, is it correct?"
|
bashio::log.fatal "Your server $server from $disk doesn't ping, is it correct?"
|
||||||
|
break
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Prepare mount point
|
# Prepare mount point
|
||||||
|
|||||||
Reference in New Issue
Block a user