starsz commented on code in PR #548: URL: https://github.com/apache/apisix-docker/pull/548#discussion_r1540772212
########## compose/modify_config.sh: ########## @@ -0,0 +1,13 @@ +#!/bin/sh + +# Generate a random string +random_string=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32) + +# Perform substitution using sed +sed "s/key: ''/key: $random_string/g" /config.yaml > /tmp/temp_config.yaml + +# Copy the content of the temporary file back to the original file +cat /tmp/temp_config.yaml > /config.yaml + +# Remove the temporary file +rm /tmp/temp_config.yaml Review Comment: I think we can combine those command into one command. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
