diff --git a/README.md b/README.md index 292ff46..bff1fa7 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,7 @@ OR set local storage: required arg: ";;" is how it's called for clients path to share + NOTE: for the default values, just leave blank [browseable] default:'yes' or 'no' [readonly] default:'yes' or 'no' [guest] allowed default:'yes' or 'no' diff --git a/samba.sh b/samba.sh index 4cccfb9..b7cf5b2 100755 --- a/samba.sh +++ b/samba.sh @@ -46,7 +46,7 @@ share() { local share="$1" path="$2" browse=${3:-yes} ro=${4:-yes}\ echo " browseable = $browse" >> $file echo " read only = $ro" >> $file echo " guest ok = $guest" >> $file - [[ ${users:-""} ]] && + [[ ${users:-""} && ! ${users:-""} =~ all ]] && echo " valid users = $(tr ',' ' ' <<< $users)" >> $file echo -e "" >> $file } @@ -88,6 +88,7 @@ Options (fields in '[]' are optional, '<>' are required): required arg: \";;\" is how it's called for clients path to share + NOTE: for the default value, just leave blank [browseable] default:'yes' or 'no' [readonly] default:'yes' or 'no' [guest] allowed default:'yes' or 'no'