45Drives / cockpit-file-sharing

A Cockpit plugin to easily manage samba and NFS file sharing.
GNU General Public License v3.0
596 stars 32 forks source link

Fix echo at Import Shares from smb.conf #35

Closed dgoo2308 closed 2 years ago

dgoo2308 commented 2 years ago

add -e to echo to create the /etc/samba/smb.conf

$> echo "[Global]\n\tinclude = registry"  > /etc/samba/smb.conf

creates

[Global]\n\tinclude = registry

while

$> echo -e "[Global]\n\tinclude = registry"  > /etc/samba/smb.conf

produces the required output:

[Global]
    include = registry
joshuaboud commented 2 years ago

Good catch. I use Zsh as my shell and it properly interprets escaped characters in double quotes without -e, never thought to try in Bash.