replace --no-run-if-empty with -r
Co-authored-by: Karol Wypchło <kwypchlo@gmail.com>
This commit is contained in:
parent
f0434da421
commit
e5fb26ca95
|
@ -50,7 +50,7 @@ do
|
||||||
for skylink in "${skylinks[@]}";
|
for skylink in "${skylinks[@]}";
|
||||||
do
|
do
|
||||||
echo ".. ⌁ Blocking skylink ${skylink} on ${server}"
|
echo ".. ⌁ Blocking skylink ${skylink} on ${server}"
|
||||||
cached_files_command="find /data/nginx/cache/ -type f | xargs --no-run-if-empty grep -Elsq '^Skynet-Skylink: ${skylink}'"
|
cached_files_command="find /data/nginx/cache/ -type f | xargs -r grep -Elsq '^Skynet-Skylink: ${skylink}'"
|
||||||
ssh -q -t user@${server} "docker exec -it nginx bash -c ${cached_files_command} | xargs -r rm"
|
ssh -q -t user@${server} "docker exec -it nginx bash -c ${cached_files_command} | xargs -r rm"
|
||||||
echo ".. ⌁ Skylink ${skylink} Blocked on ${server}"
|
echo ".. ⌁ Skylink ${skylink} Blocked on ${server}"
|
||||||
echo "--------------------------------------------"
|
echo "--------------------------------------------"
|
||||||
|
|
Reference in New Issue