"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "bin/scripts/mongodb.install.sh" between
countly-server-20.04.1.4.tar.gz and countly-server-20.04.1.5.tar.gz

About: countly-server is a mobile & web analytics, push notifications and crash reporting platform. This is the server part that collects and analyzes data while individual client SDKs (mobile, web or desktop) send the data. Community Edition (commercial Enterprise Edition also available).

mongodb.install.sh  (countly-server-20.04.1.4):mongodb.install.sh  (countly-server-20.04.1.5)
skipping to change at line 30 skipping to change at line 30
fi fi
sed -i "s#storage:#storage:\n${INDENT_STRING}wiredTiger:\n${INDENT_STRING}${ INDENT_STRING}engineConfig:\n${INDENT_STRING}${INDENT_STRING}${INDENT_STRING}dir ectoryForIndexes: true#g" ${MONGODB_CONFIG_FILE} sed -i "s#storage:#storage:\n${INDENT_STRING}wiredTiger:\n${INDENT_STRING}${ INDENT_STRING}engineConfig:\n${INDENT_STRING}${INDENT_STRING}${INDENT_STRING}dir ectoryForIndexes: true#g" ${MONGODB_CONFIG_FILE}
} }
function mongodb_logrotate () { function mongodb_logrotate () {
#add mongod entry for logrotate daemon #add mongod entry for logrotate daemon
if [ -x "$(command -v logrotate)" ]; then if [ -x "$(command -v logrotate)" ]; then
INDENT_LEVEL=$(grep dbPath "${MONGODB_CONFIG_FILE}" | awk -F"[ ]" '{for( i=1;i<=NF && ($i=="");i++);print i-1}') INDENT_LEVEL=$(grep dbPath "${MONGODB_CONFIG_FILE}" | awk -F"[ ]" '{for( i=1;i<=NF && ($i=="");i++);print i-1}')
INDENT_STRING=$(printf ' %.0s' $(seq 1 "$INDENT_LEVEL")) INDENT_STRING=$(printf ' %.0s' $(seq 1 "$INDENT_LEVEL"))
MONGODB_DATA_PATH=$(grep "dbPath" "${MONGODB_CONFIG_FILE}" | awk -F' ' ' {print $2}')
#delete if any other logRotate directive exist and add logRotate to mong od.conf #delete if any other logRotate directive exist and add logRotate to mong od.conf
sed -i '/logRotate/d' "$MONGODB_CONFIG_FILE" sed -i '/logRotate/d' "$MONGODB_CONFIG_FILE"
sed -i "s#systemLog:#systemLog:\n${INDENT_STRING}logRotate: reopen#g" "$ MONGODB_CONFIG_FILE" sed -i "s#systemLog:#systemLog:\n${INDENT_STRING}logRotate: reopen#g" "$ MONGODB_CONFIG_FILE"
if [ -f /etc/redhat-release ]; then if [ -f /etc/redhat-release ]; then
cat <<'EOF' > /etc/logrotate.d/mongod cat <<'EOF' > /etc/logrotate.d/mongod
/var/log/mongodb/mongod.log { /var/log/mongodb/mongod.log {
daily daily
size 100M size 100M
rotate 5 rotate 5
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)