File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -122,6 +122,10 @@ else
122122fi
123123echo " session-timeout = ${SE_NODE_SESSION_TIMEOUT} " >> " $FILENAME "
124124echo " override-max-sessions = ${SE_NODE_OVERRIDE_MAX_SESSIONS} " >> " $FILENAME "
125+ # Validate SE_NODE_MAX_SESSIONS is a positive integer
126+ if [[ " ${SE_NODE_MAX_SESSIONS} " =~ ^[0-9]+$ ]] && [[ " ${SE_NODE_MAX_SESSIONS} " -gt 0 ]]; then
127+ echo " max-sessions = ${SE_NODE_MAX_SESSIONS} " >> " $FILENAME "
128+ fi
125129echo " detect-drivers = false" >> " $FILENAME "
126130echo " drain-after-session-count = ${DRAIN_AFTER_SESSION_COUNT:- $SE_DRAIN_AFTER_SESSION_COUNT } " >> " $FILENAME "
127131echo " " >> " $FILENAME "
@@ -174,10 +178,6 @@ if [ -d "/opt/selenium/browsers" ]; then
174178 echo " [[node.driver-configuration]]" >> " $FILENAME "
175179 echo " display-name = \" ${SE_NODE_BROWSER_NAME} \" " >> " $FILENAME "
176180 echo " stereotype = '${SE_NODE_STEREOTYPE} '" >> " $FILENAME "
177- # Validate SE_NODE_MAX_SESSIONS is a positive integer
178- if [[ " ${SE_NODE_MAX_SESSIONS} " =~ ^[0-9]+$ ]] && [[ " ${SE_NODE_MAX_SESSIONS} " -gt 0 ]]; then
179- echo " max-sessions = ${SE_NODE_MAX_SESSIONS} " >> " $FILENAME "
180- fi
181181 echo " " >> " $FILENAME "
182182 fi
183183
You can’t perform that action at this time.
0 commit comments