Skip to content
Snippets Groups Projects
Verified Commit 946d50fb authored by David Beniamine's avatar David Beniamine
Browse files

Deploy script to limit number of samba opens

parent 726376db
No related branches found
No related tags found
No related merge requests found
deploy.sh 100644 → 100755
...@@ -5,3 +5,7 @@ then ...@@ -5,3 +5,7 @@ then
exit 1 exit 1
fi fi
DIR=`dirname $0` DIR=`dirname $0`
# Update lcs-smb-config then run it to force max connections to 1
awk 'BEGIN{PRINT=1;FOUND=0} /^[";]*$/{if(IN){IN=0;if(FOUND==0){print "\tmax connections = 1";FOUND=1}}} /^\[homes\]/{IN=1} /max connections/{if(IN){FOUND=1;PRINT=0; print "\tmax connections = 1"}} {if(PRINT){print $0};PRINT=1}' /usr/share/lcs/sbin/lcs-smb-config > /usr/share/lcs/sbin/lcs-smb-config.new
cp /usr/share/lcs/sbin/lcs-smb-config.new /usr/share/lcs/sbin/lcs-smb-config
/usr/share/lcs/sbin/lcs-smb-config
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment