Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0


## [Unreleased]
### Changed
- [COMMON] Use new mongodb `connect` command to interact with all versions of DB


## [1.0.4] - 2025-10-29
Expand Down
6 changes: 1 addition & 5 deletions usr/local/share/vulture-utils/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,12 @@ error_and_blink() {
######################
exec_mongo() {
_command="$1"
_hostname="$(hostname)"

if ! /usr/sbin/jls | /usr/bin/grep -q mongodb; then
return 1
fi
if [ -z "$_hostname" ] || [ -z "${_command}" ]; then
return 1
fi

/usr/sbin/jexec mongodb mongo --ssl --sslCAFile /var/db/pki/ca.pem --sslPEMKeyFile /var/db/pki/node.pem "${_hostname}:9091" -eval "${_command}"
/usr/sbin/jexec mongodb connect -- --eval "${_command}"
return $?
}

Expand Down