diff --git a/nifi/stackable/bin/update_config b/nifi/stackable/bin/update_config new file mode 100755 index 000000000..5db6dfbf1 --- /dev/null +++ b/nifi/stackable/bin/update_config @@ -0,0 +1,15 @@ +#!/bin/sh -e +# This script updates the nifi.properties file with the sensitive props key taken from an env var. + +nifi_props_file=/stackable/nifi/conf/nifi.properties + +# 1 - value to search for +# 2 - value to replace +# 3 - file to perform replacement inline +prop_replace () { + target_file=${3:-${nifi_props_file}} + echo 'replacing target file ' ${target_file} + sed -i -e "s|^$1=.*$|$1=$2|" ${target_file} +} + +prop_replace nifi.sensitive.props.key "$NIFI_SENSITIVE_PROPS_KEY" \ No newline at end of file