mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
[fix] Only try to stop/remove containers if at least one exists
This commit is contained in:
@@ -1525,9 +1525,11 @@ reinstall_init() {
|
||||
|
||||
if command -v docker &> /dev/null; then
|
||||
# Stop and remove all so-* containers so files can be changed with more safety
|
||||
if [ $(docker ps -a -q --filter "name=so-") -gt 0 ]; then
|
||||
docker stop $(docker ps -a -q --filter "name=so-")
|
||||
docker rm -f $(docker ps -a -q --filter "name=so-")
|
||||
fi
|
||||
fi
|
||||
|
||||
local date_string
|
||||
date_string=$(date +%s)
|
||||
|
||||
Reference in New Issue
Block a user