Add check before stop

This commit is contained in:
2025-04-25 13:06:07 +02:00
parent b0bd180ecc
commit b56e6aa182

View File

@@ -9,7 +9,9 @@ DOMAIN="https://vw.jamesvillage.dev"
DATA_FOLDER="$HOME/.local/share/vaultwarden/data"
mkdir -p $DATA_FOLDER
systemctl --user stop container-$CONTAINER_NAME.service
if systemctl --user list-units --full --all | grep -q "container-${CONTAINER_NAME}.service"; then
systemctl --user stop container-${CONTAINER_NAME}.service
fi
# if podman container exists "$CONTAINER_NAME"; then
# echo "Stop and delete existing container $CONTAINER_NAME"