mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2026-06-22 10:18:09 +02:00
uninstall elastic-agent before stopping dockers on reinstall
This commit is contained in:
+3
-3
@@ -1604,6 +1604,9 @@ reinstall_init() {
|
|||||||
# Drop systemd's in-memory references to the now-removed units
|
# Drop systemd's in-memory references to the now-removed units
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
|
|
||||||
|
# Uninstall local Elastic Agent, if installed
|
||||||
|
elastic-agent uninstall -f
|
||||||
|
|
||||||
if command -v docker &> /dev/null; then
|
if command -v docker &> /dev/null; then
|
||||||
# Stop and remove all so-* containers so files can be changed with more safety
|
# Stop and remove all so-* containers so files can be changed with more safety
|
||||||
if [[ $(docker ps -a -q --filter "name=so-" | wc -l) -gt 0 ]]; then
|
if [[ $(docker ps -a -q --filter "name=so-" | wc -l) -gt 0 ]]; then
|
||||||
@@ -1626,9 +1629,6 @@ reinstall_init() {
|
|||||||
backup_dir /nsm/hydra "$date_string"
|
backup_dir /nsm/hydra "$date_string"
|
||||||
backup_dir /nsm/influxdb "$date_string"
|
backup_dir /nsm/influxdb "$date_string"
|
||||||
|
|
||||||
# Uninstall local Elastic Agent, if installed
|
|
||||||
elastic-agent uninstall -f
|
|
||||||
|
|
||||||
} >> "$setup_log" 2>&1
|
} >> "$setup_log" 2>&1
|
||||||
|
|
||||||
info "System reinstall init has been completed."
|
info "System reinstall init has been completed."
|
||||||
|
|||||||
Reference in New Issue
Block a user