Skip to content

Commit

Permalink
Added timeout options
Browse files Browse the repository at this point in the history
  • Loading branch information
Sepideh Roghanchi committed Nov 8, 2024
1 parent c002adf commit 4cf2179
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions src/nfsv4mountscript.sh
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,37 @@ add_stunnel_configuration()
return 1
fi

echo "socket = l:SO_KEEPALIVE=1 " >> $stunnel_conf_file
if [ $? -ne 0 ]; then
chattr -f +i $stunnel_conf_file
eecho "Failed to add local socket to $stunnel_conf_file!"
return 1
fi
echo "socket = r:SO_KEEPALIVE=1 " >> $stunnel_conf_file
if [ $? -ne 0 ]; then
chattr -f +i $stunnel_conf_file
eecho "Failed to add remote socket to $stunnel_conf_file!"
return 1
fi
echo "TIMEOUTbusy = 23" >> $stunnel_conf_file
if [ $? -ne 0 ]; then
chattr -f +i $stunnel_conf_file
eecho "Failed to add TIMEOUTbusy to $stunnel_conf_file!"
return 1
fi
echo "TIMEOUTidle = 23" >> $stunnel_conf_file
if [ $? -ne 0 ]; then
chattr -f +i $stunnel_conf_file
eecho "Failed to add TIMEOUTidle to $stunnel_conf_file!"
return 1
fi
echo "TIMEOUTclose = 0" >> $stunnel_conf_file
if [ $? -ne 0 ]; then
chattr -f +i $stunnel_conf_file
eecho "Failed to add TIMEOUTclose to $stunnel_conf_file!"
return 1
fi

echo >> $stunnel_conf_file

echo "[$storageaccount_ip]" >> $stunnel_conf_file
Expand Down

0 comments on commit 4cf2179

Please sign in to comment.