mirror of
https://github.com/YunoHost-Apps/samba_ynh.git
synced 2024-09-03 20:16:27 +02:00
fix: bad sed regex
This commit is contained in:
parent
a424b1ff1f
commit
a587dfcd4a
1 changed files with 3 additions and 3 deletions
|
@ -94,7 +94,7 @@ END
|
||||||
# Remove configuration for unlisted directories
|
# Remove configuration for unlisted directories
|
||||||
pushd $install_dir/smb.conf.d
|
pushd $install_dir/smb.conf.d
|
||||||
for $directory in $(ls !(0-global).conf); do
|
for $directory in $(ls !(0-global).conf); do
|
||||||
if ! [[ "${directory%.conf}" =~ $(echo "^($(echo $directories | sed s/ /|/g))$") ]]; then
|
if ! [[ "${directory%.conf}" =~ $(echo "^($(echo $directories | sed 's/,\| /|/g'))$") ]]; then
|
||||||
ynh_secure_remove "$install_dir/smb.conf.d/"
|
ynh_secure_remove "$install_dir/smb.conf.d/"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
@ -119,7 +119,7 @@ set__readonly_dir() {
|
||||||
local value
|
local value
|
||||||
for directory in $(echo $directories | sed "s/,/ /g"); do
|
for directory in $(echo $directories | sed "s/,/ /g"); do
|
||||||
value="no"
|
value="no"
|
||||||
if [[ $directory =~ $(echo "^($(echo $readonly_dir | sed s/ /|/g))$") ]]; then
|
if [[ $directory =~ $(echo "^($(echo $readonly_dir | sed 's/,\| /|/g'))$") ]]; then
|
||||||
value="yes"
|
value="yes"
|
||||||
fi
|
fi
|
||||||
ynh_write_var_in_file --file=$install_dir/smb.conf.d/$directory.conf --key="read only" --value="$value"
|
ynh_write_var_in_file --file=$install_dir/smb.conf.d/$directory.conf --key="read only" --value="$value"
|
||||||
|
@ -131,7 +131,7 @@ set__unbrowseable() {
|
||||||
local value
|
local value
|
||||||
for directory in $(echo $directories | sed "s/,/ /g"); do
|
for directory in $(echo $directories | sed "s/,/ /g"); do
|
||||||
value="yes"
|
value="yes"
|
||||||
if [[ $directory =~ $(echo "^($(echo $unbrowseable | sed s/ /|/g))$") ]]; then
|
if [[ $directory =~ $(echo "^($(echo $unbrowseable | sed 's/,\| /|/g'))$") ]]; then
|
||||||
value="no"
|
value="no"
|
||||||
fi
|
fi
|
||||||
ynh_write_var_in_file --file=$install_dir/smb.conf.d/$directory.conf --key="browsable" --value="$value"
|
ynh_write_var_in_file --file=$install_dir/smb.conf.d/$directory.conf --key="browsable" --value="$value"
|
||||||
|
|
Loading…
Reference in a new issue