From be1e3030407f0f87f05e90cf881236c86d0408f8 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Thu, 12 Jan 2023 16:53:37 +0100 Subject: [PATCH] improve readability --- linux/evocheck.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/linux/evocheck.sh b/linux/evocheck.sh index 9c00529..c6ba027 100755 --- a/linux/evocheck.sh +++ b/linux/evocheck.sh @@ -1210,18 +1210,18 @@ check_no_lxc_container() { # Check that in LXC containers, phpXX-fpm services have UMask set to 0007. check_lxc_php_fpm_service_umask_set() { if is_installed lxc; then - php_containers_list=$(lxc-ls | grep php) + php_containers_list=$(lxc-ls --filter php) missing_umask="" - for c in $php_containers_list; do + for container in $php_containers_list; do # Translate container name in service name - if [ "$c" = "php56" ]; then + if [ "$container" = "php56" ]; then service="php5-fpm" else - service="${c:0:4}.${c:4}-fpm" + service="${container:0:4}.${container:4}-fpm" fi - umask=$(lxc-attach --name "$c" -- systemctl show -p UMask "$service" | cut -d "=" -f2) + umask=$(lxc-attach --name "${container}" -- systemctl show -p UMask "$service" | cut -d "=" -f2) if ! [ "$umask" != "0007" ]; then - missing_umask="${missing_umask} ${c}" + missing_umask="${missing_umask} ${container}" fi done if [ -n "${missing_umask}" ]; then