Skip to content

Commit

Permalink
samba.sh fix #76
Browse files Browse the repository at this point in the history
  • Loading branch information
David Personette committed Oct 12, 2017
1 parent e0631f4 commit f761466
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion samba.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ charmap() { local chars="$1" file=/etc/samba/smb.conf
# Arguments:
# option) raw option
# Return: line added to smb.conf (replaces existing line with same key)
global() { local key="${1%%=*}" value="${1##*=}" file=/etc/samba/smb.conf
global() { local key="${1%%=*}" value="${1#*=}" file=/etc/samba/smb.conf
if grep -qE '^\s*'"$key" "$file"; then
sed -i 's|^\s*'"$key"'.*| '"$key = $value"'|' "$file"
else
Expand Down

0 comments on commit f761466

Please sign in to comment.