File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 3535
3636# search engine
3737SEARCH_ENGINE=${21}
38- if [ " $SEARCH_ENGINE " != " opensearch" ] || $( dpkg --compare-versions " ${PROJECT_VERSION} " " lt" " 2.4.6" ) ; then
39- SEARCH_ENGINE=' elasticsearch'
38+ if [ " $SEARCH_ENGINE " != " opensearch" ]; then
39+ if $( dpkg --compare-versions " ${PROJECT_VERSION} " " ge" " 2.4.6" ) ; then
40+ SEARCH_ENGINE=' elasticsearch8'
41+ elif $( dpkg --compare-versions " ${PROJECT_VERSION} " " ge" " 2.4.0" ) ; then
42+ SEARCH_ENGINE=' elasticsearch7'
43+ else
44+ SEARCH_ENGINE=' elasticsearch6'
45+ fi
4046fi
4147
4248# two factor auth
Original file line number Diff line number Diff line change @@ -89,13 +89,7 @@ if $(dpkg --compare-versions "${PROJECT_VERSION}" "gt" "2.2"); then
8989 if [ " $PROJECT_SEARCH_ENGINE " == " opensearch" ]; then
9090 sudo -u vagrant " $PROJECT_PATH " /bin/magento config:set " catalog/search/engine" " opensearch"
9191 else
92- if $( dpkg --compare-versions " ${PROJECT_VERSION} " " ge" " 2.4.6" ) ; then
93- sudo -u vagrant " $PROJECT_PATH " /bin/magento config:set " catalog/search/engine" " elasticsearch8"
94- elif $( dpkg --compare-versions " ${PROJECT_VERSION} " " ge" " 2.4.0" ) ; then
95- sudo -u vagrant " $PROJECT_PATH " /bin/magento config:set " catalog/search/engine" " elasticsearch7"
96- else
97- sudo -u vagrant " $PROJECT_PATH " /bin/magento config:set " catalog/search/engine" " elasticsearch6"
98- fi
92+ sudo -u vagrant " $PROJECT_PATH " /bin/magento config:set " catalog/search/engine" $PROJECT_SEARCH_ENGINE
9993 fi
10094else
10195 # Force https on unsecure request for older versions
You can’t perform that action at this time.
0 commit comments