mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
update salt mine before salt-master and salt-minion get stopped
This commit is contained in:
@@ -731,6 +731,13 @@ update_centos_repo() {
|
|||||||
createrepo /nsm/repo
|
createrepo /nsm/repo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
update_salt_mine() {
|
||||||
|
echo "Populating the mine with network.ip_addrs pillar.host.mainint for each host."
|
||||||
|
set +e
|
||||||
|
salt \* cmd.run cmd='MAININT=$(salt-call pillar.get host:mainint --out=newline_values_only) && salt-call mine.send name=network.ip_addrs interface="$MAININT"'
|
||||||
|
set -e
|
||||||
|
}
|
||||||
|
|
||||||
update_version() {
|
update_version() {
|
||||||
# Update the version to the latest
|
# Update the version to the latest
|
||||||
echo "Updating the Security Onion version file."
|
echo "Updating the Security Onion version file."
|
||||||
@@ -969,6 +976,9 @@ main() {
|
|||||||
echo "Performing upgrade from Security Onion $INSTALLEDVERSION to Security Onion $NEWVERSION."
|
echo "Performing upgrade from Security Onion $INSTALLEDVERSION to Security Onion $NEWVERSION."
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
|
# update mine items prior to stopping salt-minion and salt-master
|
||||||
|
update_salt_mine
|
||||||
|
|
||||||
echo "Updating dockers to $NEWVERSION."
|
echo "Updating dockers to $NEWVERSION."
|
||||||
if [[ $is_airgap -eq 0 ]]; then
|
if [[ $is_airgap -eq 0 ]]; then
|
||||||
airgap_update_dockers
|
airgap_update_dockers
|
||||||
@@ -1056,11 +1066,6 @@ main() {
|
|||||||
salt-call state.apply salt.python3-influxdb -l info queue=True
|
salt-call state.apply salt.python3-influxdb -l info queue=True
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
echo "Populating the mine with network.ip_addrs pillar.host.mainint for each host."
|
|
||||||
set +e
|
|
||||||
salt \* cmd.run cmd='MAININT=$(salt-call pillar.get host:mainint --out=newline_values_only) && salt-call mine.send name=network.ip_addrs interface="$MAININT"'
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# Only regenerate osquery packages if Fleet is enabled
|
# Only regenerate osquery packages if Fleet is enabled
|
||||||
FLEET_MANAGER=$(lookup_pillar fleet_manager)
|
FLEET_MANAGER=$(lookup_pillar fleet_manager)
|
||||||
FLEET_NODE=$(lookup_pillar fleet_node)
|
FLEET_NODE=$(lookup_pillar fleet_node)
|
||||||
|
|||||||
Reference in New Issue
Block a user