1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/samba_ynh.git synced 2024-09-03 20:16:27 +02:00

fix: the config from being overwritten if a new directory gets added

This commit is contained in:
Hemi03 2024-03-29 20:00:29 +01:00
parent 0ab30e3ac0
commit 9553a6b7cd

View file

@ -61,9 +61,9 @@ set__directories() {
chown -R root:root "$data_dir/$directory"
setfacl -R -m g:samba.$directory:rwx,d:g:samba.$directory:rwx $data_dir/$directory
# Add the configuration in /etc/samba/smb.conf if needed
cat > $install_dir/smb.conf.d/$directory.conf <<END
# Add the configuration in /etc/samba/smb.conf.d/ if its missing
if [ ! -f "$install_dir/smb.conf.d/$directory.conf" ]; then
cat > $install_dir/smb.conf.d/$directory.conf <<END
[$directory]
comment = $directory
read only = no
@ -78,6 +78,7 @@ set__directories() {
recycle:keeptree = yes
recycle:versions = yes
END
fi
done