mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Only sync web users if teh sqlite db exists
This commit is contained in:
@@ -185,6 +185,7 @@ function syncElastic() {
|
||||
syncElasticSystemRole "$authPillarJson" "so_monitor_user" "remote_monitoring_collector" "$rolesFileTmp"
|
||||
syncElasticSystemRole "$authPillarJson" "so_monitor_user" "remote_monitoring_agent" "$rolesFileTmp"
|
||||
|
||||
if [[ -f "$databasePath" ]]; then
|
||||
# Generate the new users file
|
||||
echo "select '{\"user\":\"' || ici.identifier || '\", \"data\":' || ic.config || '}'" \
|
||||
"from identity_credential_identifiers ici, identity_credentials ic " \
|
||||
@@ -208,6 +209,9 @@ function syncElastic() {
|
||||
[[ $? != 0 ]] && fail "Unable to read credential IDs from database"
|
||||
mv -f "$rolesFileTmp" "$elasticRolesFile"
|
||||
[[ $? != 0 ]] && fail "Unable to create users file: $elasticRolesFile"
|
||||
else
|
||||
info "Database file does not exist yet, skipping users export"
|
||||
fi
|
||||
}
|
||||
|
||||
function syncAll() {
|
||||
|
||||
Reference in New Issue
Block a user