Skip to content

Commit

Permalink
Fixed param substition in config files
Browse files Browse the repository at this point in the history
  • Loading branch information
dotneft committed Jan 9, 2025
1 parent 766cfc6 commit dc4d585
Show file tree
Hide file tree
Showing 30 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion Dockerfiles/agent/alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ update_config_var() {
var_value=$(escape_spec_char "$var_value")
var_name=$(escape_spec_char "$var_name")

if [ "$(grep -E "^$var_name=$var_value" $config_path)" ]; then
if [ "$(grep -E "^$var_name=$var_value$" $config_path)" ]; then
echo "exists"
elif [ "$(grep -E "^$var_name=" $config_path)" ] && [ "$is_multiple" != "true" ]; then
sed -i -e "/^$var_name=/s/=.*/=$var_value/" "$config_path"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/agent/centos/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ update_config_var() {
var_value=$(escape_spec_char "$var_value")
var_name=$(escape_spec_char "$var_name")

if [ "$(grep -E "^$var_name=$var_value" $config_path)" ]; then
if [ "$(grep -E "^$var_name=$var_value$" $config_path)" ]; then
echo "exists"
elif [ "$(grep -E "^$var_name=" $config_path)" ] && [ "$is_multiple" != "true" ]; then
sed -i -e "/^$var_name=/s/=.*/=$var_value/" "$config_path"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/agent/ol/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ update_config_var() {
var_value=$(escape_spec_char "$var_value")
var_name=$(escape_spec_char "$var_name")

if [ "$(grep -E "^$var_name=$var_value" $config_path)" ]; then
if [ "$(grep -E "^$var_name=$var_value$" $config_path)" ]; then
echo "exists"
elif [ "$(grep -E "^$var_name=" $config_path)" ] && [ "$is_multiple" != "true" ]; then
sed -i -e "/^$var_name=/s/=.*/=$var_value/" "$config_path"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/agent/rhel/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ update_config_var() {
var_value=$(escape_spec_char "$var_value")
var_name=$(escape_spec_char "$var_name")

if [ "$(grep -E "^$var_name=$var_value" $config_path)" ]; then
if [ "$(grep -E "^$var_name=$var_value$" $config_path)" ]; then
echo "exists"
elif [ "$(grep -E "^$var_name=" $config_path)" ] && [ "$is_multiple" != "true" ]; then
sed -i -e "/^$var_name=/s/=.*/=$var_value/" "$config_path"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/agent/ubuntu/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ update_config_var() {
var_value=$(escape_spec_char "$var_value")
var_name=$(escape_spec_char "$var_name")

if [ "$(grep -E "^$var_name=$var_value" $config_path)" ]; then
if [ "$(grep -E "^$var_name=$var_value$" $config_path)" ]; then
echo "exists"
elif [ "$(grep -E "^$var_name=" $config_path)" ] && [ "$is_multiple" != "true" ]; then
sed -i -e "/^$var_name=/s/=.*/=$var_value/" "$config_path"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/agent2/alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ update_config_var() {
var_value=$(escape_spec_char "$var_value")
var_name=$(escape_spec_char "$var_name")

if [ "$(grep -E "^$var_name=$var_value" $config_path)" ]; then
if [ "$(grep -E "^$var_name=$var_value$" $config_path)" ]; then
echo "exists"
elif [ "$(grep -E "^$var_name=" $config_path)" ] && [ "$is_multiple" != "true" ]; then
sed -i -e "/^$var_name=/s/=.*/=$var_value/" "$config_path"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/agent2/centos/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ update_config_var() {
var_value=$(escape_spec_char "$var_value")
var_name=$(escape_spec_char "$var_name")

if [ "$(grep -E "^$var_name=$var_value" $config_path)" ]; then
if [ "$(grep -E "^$var_name=$var_value$" $config_path)" ]; then
echo "exists"
elif [ "$(grep -E "^$var_name=" $config_path)" ] && [ "$is_multiple" != "true" ]; then
sed -i -e "/^$var_name=/s/=.*/=$var_value/" "$config_path"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/agent2/ol/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ update_config_var() {
var_value=$(escape_spec_char "$var_value")
var_name=$(escape_spec_char "$var_name")

if [ "$(grep -E "^$var_name=$var_value" $config_path)" ]; then
if [ "$(grep -E "^$var_name=$var_value$" $config_path)" ]; then
echo "exists"
elif [ "$(grep -E "^$var_name=" $config_path)" ] && [ "$is_multiple" != "true" ]; then
sed -i -e "/^$var_name=/s/=.*/=$var_value/" "$config_path"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/agent2/rhel/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ update_config_var() {
var_value=$(escape_spec_char "$var_value")
var_name=$(escape_spec_char "$var_name")

if [ "$(grep -E "^$var_name=$var_value" $config_path)" ]; then
if [ "$(grep -E "^$var_name=$var_value$" $config_path)" ]; then
echo "exists"
elif [ "$(grep -E "^$var_name=" $config_path)" ] && [ "$is_multiple" != "true" ]; then
sed -i -e "/^$var_name=/s/=.*/=$var_value/" "$config_path"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/agent2/ubuntu/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ update_config_var() {
var_value=$(escape_spec_char "$var_value")
var_name=$(escape_spec_char "$var_name")

if [ "$(grep -E "^$var_name=$var_value" $config_path)" ]; then
if [ "$(grep -E "^$var_name=$var_value$" $config_path)" ]; then
echo "exists"
elif [ "$(grep -E "^$var_name=" $config_path)" ] && [ "$is_multiple" != "true" ]; then
sed -i -e "/^$var_name=/s/=.*/=$var_value/" "$config_path"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/proxy-mysql/alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ update_config_var() {
var_value=$(escape_spec_char "$var_value")
var_name=$(escape_spec_char "$var_name")

if [ "$(grep -E "^$var_name=$var_value" $config_path)" ]; then
if [ "$(grep -E "^$var_name=$var_value$" $config_path)" ]; then
echo "exists"
elif [ "$(grep -E "^$var_name=" $config_path)" ] && [ "$is_multiple" != "true" ]; then
sed -i -e "/^$var_name=/s/=.*/=$var_value/" "$config_path"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/proxy-mysql/centos/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ update_config_var() {
var_value=$(escape_spec_char "$var_value")
var_name=$(escape_spec_char "$var_name")

if [ "$(grep -E "^$var_name=$var_value" $config_path)" ]; then
if [ "$(grep -E "^$var_name=$var_value$" $config_path)" ]; then
echo "exists"
elif [ "$(grep -E "^$var_name=" $config_path)" ] && [ "$is_multiple" != "true" ]; then
sed -i -e "/^$var_name=/s/=.*/=$var_value/" "$config_path"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/proxy-mysql/ol/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ update_config_var() {
var_value=$(escape_spec_char "$var_value")
var_name=$(escape_spec_char "$var_name")

if [ "$(grep -E "^$var_name=$var_value" $config_path)" ]; then
if [ "$(grep -E "^$var_name=$var_value$" $config_path)" ]; then
echo "exists"
elif [ "$(grep -E "^$var_name=" $config_path)" ] && [ "$is_multiple" != "true" ]; then
sed -i -e "/^$var_name=/s/=.*/=$var_value/" "$config_path"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/proxy-mysql/rhel/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ update_config_var() {
var_value=$(escape_spec_char "$var_value")
var_name=$(escape_spec_char "$var_name")

if [ "$(grep -E "^$var_name=$var_value" $config_path)" ]; then
if [ "$(grep -E "^$var_name=$var_value$" $config_path)" ]; then
echo "exists"
elif [ "$(grep -E "^$var_name=" $config_path)" ] && [ "$is_multiple" != "true" ]; then
sed -i -e "/^$var_name=/s/=.*/=$var_value/" "$config_path"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/proxy-mysql/ubuntu/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ update_config_var() {
var_value=$(escape_spec_char "$var_value")
var_name=$(escape_spec_char "$var_name")

if [ "$(grep -E "^$var_name=$var_value" $config_path)" ]; then
if [ "$(grep -E "^$var_name=$var_value$" $config_path)" ]; then
echo "exists"
elif [ "$(grep -E "^$var_name=" $config_path)" ] && [ "$is_multiple" != "true" ]; then
sed -i -e "/^$var_name=/s/=.*/=$var_value/" "$config_path"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/proxy-sqlite3/alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ update_config_var() {
var_value=$(escape_spec_char "$var_value")
var_name=$(escape_spec_char "$var_name")

if [ "$(grep -E "^$var_name=$var_value" $config_path)" ]; then
if [ "$(grep -E "^$var_name=$var_value$" $config_path)" ]; then
echo "exists"
elif [ "$(grep -E "^$var_name=" $config_path)" ] && [ "$is_multiple" != "true" ]; then
sed -i -e "/^$var_name=/s/=.*/=$var_value/" "$config_path"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/proxy-sqlite3/centos/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ update_config_var() {
var_value=$(escape_spec_char "$var_value")
var_name=$(escape_spec_char "$var_name")

if [ "$(grep -E "^$var_name=$var_value" $config_path)" ]; then
if [ "$(grep -E "^$var_name=$var_value$" $config_path)" ]; then
echo "exists"
elif [ "$(grep -E "^$var_name=" $config_path)" ] && [ "$is_multiple" != "true" ]; then
sed -i -e "/^$var_name=/s/=.*/=$var_value/" "$config_path"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/proxy-sqlite3/ol/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ update_config_var() {
var_value=$(escape_spec_char "$var_value")
var_name=$(escape_spec_char "$var_name")

if [ "$(grep -E "^$var_name=$var_value" $config_path)" ]; then
if [ "$(grep -E "^$var_name=$var_value$" $config_path)" ]; then
echo "exists"
elif [ "$(grep -E "^$var_name=" $config_path)" ] && [ "$is_multiple" != "true" ]; then
sed -i -e "/^$var_name=/s/=.*/=$var_value/" "$config_path"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/proxy-sqlite3/rhel/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ update_config_var() {
var_value=$(escape_spec_char "$var_value")
var_name=$(escape_spec_char "$var_name")

if [ "$(grep -E "^$var_name=$var_value" $config_path)" ]; then
if [ "$(grep -E "^$var_name=$var_value$" $config_path)" ]; then
echo "exists"
elif [ "$(grep -E "^$var_name=" $config_path)" ] && [ "$is_multiple" != "true" ]; then
sed -i -e "/^$var_name=/s/=.*/=$var_value/" "$config_path"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/proxy-sqlite3/ubuntu/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ update_config_var() {
var_value=$(escape_spec_char "$var_value")
var_name=$(escape_spec_char "$var_name")

if [ "$(grep -E "^$var_name=$var_value" $config_path)" ]; then
if [ "$(grep -E "^$var_name=$var_value$" $config_path)" ]; then
echo "exists"
elif [ "$(grep -E "^$var_name=" $config_path)" ] && [ "$is_multiple" != "true" ]; then
sed -i -e "/^$var_name=/s/=.*/=$var_value/" "$config_path"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/server-mysql/alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ update_config_var() {
var_value=$(escape_spec_char "$var_value")
var_name=$(escape_spec_char "$var_name")

if [ "$(grep -E "^$var_name=$var_value" $config_path)" ]; then
if [ "$(grep -E "^$var_name=$var_value$" $config_path)" ]; then
echo "exists"
elif [ "$(grep -E "^$var_name=" $config_path)" ] && [ "$is_multiple" != "true" ]; then
sed -i -e "/^$var_name=/s/=.*/=$var_value/" "$config_path"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/server-mysql/centos/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ update_config_var() {
var_value=$(escape_spec_char "$var_value")
var_name=$(escape_spec_char "$var_name")

if [ "$(grep -E "^$var_name=$var_value" $config_path)" ]; then
if [ "$(grep -E "^$var_name=$var_value$" $config_path)" ]; then
echo "exists"
elif [ "$(grep -E "^$var_name=" $config_path)" ] && [ "$is_multiple" != "true" ]; then
sed -i -e "/^$var_name=/s/=.*/=$var_value/" "$config_path"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/server-mysql/ol/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ update_config_var() {
var_value=$(escape_spec_char "$var_value")
var_name=$(escape_spec_char "$var_name")

if [ "$(grep -E "^$var_name=$var_value" $config_path)" ]; then
if [ "$(grep -E "^$var_name=$var_value$" $config_path)" ]; then
echo "exists"
elif [ "$(grep -E "^$var_name=" $config_path)" ] && [ "$is_multiple" != "true" ]; then
sed -i -e "/^$var_name=/s/=.*/=$var_value/" "$config_path"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/server-mysql/rhel/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ update_config_var() {
var_value=$(escape_spec_char "$var_value")
var_name=$(escape_spec_char "$var_name")

if [ "$(grep -E "^$var_name=$var_value" $config_path)" ]; then
if [ "$(grep -E "^$var_name=$var_value$" $config_path)" ]; then
echo "exists"
elif [ "$(grep -E "^$var_name=" $config_path)" ] && [ "$is_multiple" != "true" ]; then
sed -i -e "/^$var_name=/s/=.*/=$var_value/" "$config_path"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/server-mysql/ubuntu/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ update_config_var() {
var_value=$(escape_spec_char "$var_value")
var_name=$(escape_spec_char "$var_name")

if [ "$(grep -E "^$var_name=$var_value" $config_path)" ]; then
if [ "$(grep -E "^$var_name=$var_value$" $config_path)" ]; then
echo "exists"
elif [ "$(grep -E "^$var_name=" $config_path)" ] && [ "$is_multiple" != "true" ]; then
sed -i -e "/^$var_name=/s/=.*/=$var_value/" "$config_path"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/server-pgsql/alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ update_config_var() {
var_value=$(escape_spec_char "$var_value")
var_name=$(escape_spec_char "$var_name")

if [ "$(grep -E "^$var_name=$var_value" $config_path)" ]; then
if [ "$(grep -E "^$var_name=$var_value$" $config_path)" ]; then
echo "exists"
elif [ "$(grep -E "^$var_name=" $config_path)" ] && [ "$is_multiple" != "true" ]; then
sed -i -e "/^$var_name=/s/=.*/=$var_value/" "$config_path"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/server-pgsql/centos/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ update_config_var() {
var_value=$(escape_spec_char "$var_value")
var_name=$(escape_spec_char "$var_name")

if [ "$(grep -E "^$var_name=$var_value" $config_path)" ]; then
if [ "$(grep -E "^$var_name=$var_value$" $config_path)" ]; then
echo "exists"
elif [ "$(grep -E "^$var_name=" $config_path)" ] && [ "$is_multiple" != "true" ]; then
sed -i -e "/^$var_name=/s/=.*/=$var_value/" "$config_path"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/server-pgsql/ol/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ update_config_var() {
var_value=$(escape_spec_char "$var_value")
var_name=$(escape_spec_char "$var_name")

if [ "$(grep -E "^$var_name=$var_value" $config_path)" ]; then
if [ "$(grep -E "^$var_name=$var_value$" $config_path)" ]; then
echo "exists"
elif [ "$(grep -E "^$var_name=" $config_path)" ] && [ "$is_multiple" != "true" ]; then
sed -i -e "/^$var_name=/s/=.*/=$var_value/" "$config_path"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/server-pgsql/rhel/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ update_config_var() {
var_value=$(escape_spec_char "$var_value")
var_name=$(escape_spec_char "$var_name")

if [ "$(grep -E "^$var_name=$var_value" $config_path)" ]; then
if [ "$(grep -E "^$var_name=$var_value$" $config_path)" ]; then
echo "exists"
elif [ "$(grep -E "^$var_name=" $config_path)" ] && [ "$is_multiple" != "true" ]; then
sed -i -e "/^$var_name=/s/=.*/=$var_value/" "$config_path"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/server-pgsql/ubuntu/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ update_config_var() {
var_value=$(escape_spec_char "$var_value")
var_name=$(escape_spec_char "$var_name")

if [ "$(grep -E "^$var_name=$var_value" $config_path)" ]; then
if [ "$(grep -E "^$var_name=$var_value$" $config_path)" ]; then
echo "exists"
elif [ "$(grep -E "^$var_name=" $config_path)" ] && [ "$is_multiple" != "true" ]; then
sed -i -e "/^$var_name=/s/=.*/=$var_value/" "$config_path"
Expand Down

0 comments on commit dc4d585

Please sign in to comment.