Change guard condition

This commit is contained in:
Micke Nordin 2025-02-26 11:50:34 +01:00
parent 41e9045833
commit 2c974bd178
Signed by untrusted user: Micke
GPG key ID: 0DA0A7A5708FE257

View file

@ -1,7 +1,8 @@
#!/bin/bash
# Only run if this is the only instance of this script running
if [[ $(pgrep -f "${0}" | wc -l) -eq 1 ]]; then
# note: since this script forks to run pgrep, we need -eq 2 here
if [[ $(pgrep -f "${0}" | wc -l) -eq 2 ]]; then
for container in $(get_containers); do
for id in $(nocc "${container}" files_external:list --all --output json | jq '.[].mount_id' | jq .); do
nocc "${container}" files_external:scan "${id}"