From efd587bdd1eb4e7ce359b576938cd874e7f4f07a Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Mon, 29 Aug 2022 16:49:16 +0100 Subject: [PATCH] Read CAP_STR into an array and output one cap per line in startup Signed-off-by: Adam Warner --- src/s6/debian-root/usr/local/bin/bash_functions.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/s6/debian-root/usr/local/bin/bash_functions.sh b/src/s6/debian-root/usr/local/bin/bash_functions.sh index 59ac34f..25681d3 100644 --- a/src/s6/debian-root/usr/local/bin/bash_functions.sh +++ b/src/s6/debian-root/usr/local/bin/bash_functions.sh @@ -44,7 +44,11 @@ fix_capabilities() { if [[ ${CAP_STR} ]]; then # We have the (some of) the above caps available to us - apply them to pihole-FTL echo " [i] Applying the following caps to pihole-FTL:" - echo " ${CAP_STR:1}" + IFS=',' read -ra CAPS <<< "${CAP_STR:1}" + for i in "${CAPS[@]}"; do + echo " * ${i}" + done + setcap ${CAP_STR:1}+ep "$(which pihole-FTL)" || ret=$? if [[ $DHCP_READY == false ]] && [[ $DHCP_ACTIVE == true ]]; then