Skip to content

Commit 36014f5

Browse files
Merge pull request #5837 from Countly/fix/upgrade-script-2412
fixed mongo7 and 2412 upgrade scripts
2 parents 8694bf0 + 50e935e commit 36014f5

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

bin/upgrade/24.12/upgrade.mongo.70.sh

+9
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,15 @@ if [ -f /etc/redhat-release ]; then
117117
systemctl daemon-reload
118118
fi
119119

120+
# check and comment out journal: enabled: true in mongod.conf
121+
CONF_FILE="/etc/mongod.conf"
122+
if grep -qP '^\s*journal\s*:\s*$' "$CONF_FILE" && grep -qP '^\s*enabled\s*:\s*true\s*$' "$CONF_FILE"; then
123+
echo "Commenting out journal: enabled: true in $CONF_FILE"
124+
sed -i '/^\s*journal\s*:/ { N; s/\(.*\n\s*\)\(enabled\s*:\s*true\s*$\)/# \1# \2/ }' "$CONF_FILE"
125+
else
126+
echo "Could not find 'journal: enabled: true' in $CONF_FILE or it's already commented."
127+
fi
128+
120129
#mongodb might need to be started
121130
systemctl restart mongod || echo "mongodb systemctl job does not exist"
122131

bin/upgrade/24.12/upgrade_db.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
VER="24.10"
3+
VER="24.12"
44

55
CONTINUE="$(countly check before upgrade db "$VER")"
66

@@ -22,8 +22,8 @@ then
2222

2323
if [ "$1" != "combined" ]; then
2424
#upgrade plugins
25-
countly plugin enable journey_engine;
2625
countly plugin enable content;
26+
countly plugin enable journey_engine;
2727
nodejs "$DIR/scripts/install_plugins.js"
2828
fi
2929

bin/upgrade/24.12/upgrade_fs.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
echo "Running filesystem modifications"
44

5-
VER="24.10"
5+
VER="24.12"
66

77
CONTINUE="$(countly check before upgrade fs "$VER")"
88

@@ -23,8 +23,8 @@ then
2323
#enable command line
2424
bash "$DIR/scripts/detect.init.sh"
2525

26-
countly plugin enable journey_engine;
2726
countly plugin enable content;
27+
countly plugin enable journey_engine;
2828

2929
#upgrade plugins
3030
nodejs "$DIR/scripts/install_plugins.js"

0 commit comments

Comments
 (0)