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,8 +1525,10 @@ reinstall_init() {
|
|||||||
|
|
||||||
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
|
||||||
docker stop $(docker ps -a -q --filter "name=so-")
|
if [ $(docker ps -a -q --filter "name=so-") -gt 0 ]; then
|
||||||
docker rm -f $(docker ps -a -q --filter "name=so-")
|
docker stop $(docker ps -a -q --filter "name=so-")
|
||||||
|
docker rm -f $(docker ps -a -q --filter "name=so-")
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local date_string
|
local date_string
|
||||||
|
|||||||
Reference in New Issue
Block a user