We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 26f629d commit 8323fb7Copy full SHA for 8323fb7
1 file changed
bin/v-add-firewall-ipset
@@ -89,7 +89,9 @@ if [ ! -f "${IPSET_PATH}/${IPSET_FILE}.iplist" ] || [ "$force" = "yes" ]; then
89
# Advanced: execute script with the same basename for aditional pre-processing
90
# ex:
91
if [ -x "${IPSET_PATH}/${IPSET_FILE}.sh" ]; then
92
- setpriv --clear-groups --reuid nobody --regid nogroup -- ${IPSET_PATH}/${IPSET_FILE}.sh "$ip_name" "$iplist_tempfile"
+ preprocess_output="$(cat "$iplist_tempfile" | setpriv --clear-groups --reuid nobody --regid nogroup -- ${IPSET_PATH}/${IPSET_FILE}.sh "$ip_name" "$iplist_tempfile")"
93
+ check_result $? "Preprocessing script failed (${IPSET_FILE}.sh)"
94
+ [[ "$preprocess_output" ]] && echo "$preprocess_output" > "$iplist_tempfile"
95
fi
96
97
elif [[ "$data_source" =~ ^script:/ ]]; then
0 commit comments