|
|
@ -1,5 +1,7 @@ |
|
|
|
#!/bin/bash |
|
|
|
|
|
|
|
### DO NOT EDIT THIS FILE |
|
|
|
|
|
|
|
function usage { |
|
|
|
echo |
|
|
|
echoMainTitle "Create configuration files" |
|
|
@ -59,7 +61,13 @@ path="$project_manager_dir/data/$customer/$project" |
|
|
|
quoted_socket="$(sedEscape "$db_stage_socket")" |
|
|
|
quoted_password="$(sedEscape "$db_stage_password")" |
|
|
|
quoted_admin_password="$(sedEscape "$db_stage_admin_password")" |
|
|
|
cat "$template_file" | \ |
|
|
|
if [ "$quoted_socket" == "" ] |
|
|
|
then |
|
|
|
file_string="$(cat "$template_file" | sed "s/socket=//")" |
|
|
|
else |
|
|
|
file_string="$(cat "$template_file")" |
|
|
|
fi |
|
|
|
echo "$file_string" | \ |
|
|
|
sed "s/socket=/socket=$quoted_socket/" | \ |
|
|
|
sed "s/host=/host=$db_stage_host/" | \ |
|
|
|
sed "s/port=/port=$db_stage_port/" | \ |
|
|
@ -71,7 +79,13 @@ cat "$template_file" | \ |
|
|
|
quoted_socket="$(sedEscape "$db_live_socket")" |
|
|
|
quoted_password="$(sedEscape "$db_live_password")" |
|
|
|
quoted_admin_password="$(sedEscape "$db_live_admin_password")" |
|
|
|
cat "$template_file" | \ |
|
|
|
if [ "$quoted_socket" == "" ] |
|
|
|
then |
|
|
|
file_string="$(cat "$template_file" | sed "s/socket=//")" |
|
|
|
else |
|
|
|
file_string="$(cat "$template_file")" |
|
|
|
fi |
|
|
|
echo "$file_string" | \ |
|
|
|
sed "s/socket=/socket=$quoted_socket/" | \ |
|
|
|
sed "s/host=/host=$db_live_host/" | \ |
|
|
|
sed "s/port=/port=$db_live_port/" | \ |
|
|
@ -83,7 +97,13 @@ cat "$template_file" | \ |
|
|
|
quoted_socket="$(sedEscape "$db_local_stage_socket")" |
|
|
|
quoted_password="$(sedEscape "$db_local_stage_password")" |
|
|
|
quoted_admin_password="$(sedEscape "$db_local_stage_admin_password")" |
|
|
|
cat "$template_file" | \ |
|
|
|
if [ "$quoted_socket" == "" ] |
|
|
|
then |
|
|
|
file_string="$(cat "$template_file" | sed "s/socket=//")" |
|
|
|
else |
|
|
|
file_string="$(cat "$template_file")" |
|
|
|
fi |
|
|
|
echo "$file_string" | \ |
|
|
|
sed "s/socket=/socket=$quoted_socket/" | \ |
|
|
|
sed "s/host=/host=$db_local_stage_host/" | \ |
|
|
|
sed "s/port=/port=$db_local_stage_port/" | \ |
|
|
@ -95,7 +115,13 @@ cat "$template_file" | \ |
|
|
|
quoted_socket="$(sedEscape "$db_local_live_socket")" |
|
|
|
quoted_password="$(sedEscape "$db_local_live_password")" |
|
|
|
quoted_admin_password="$(sedEscape "$db_local_live_admin_password")" |
|
|
|
cat "$template_file" | \ |
|
|
|
if [ "$quoted_socket" == "" ] |
|
|
|
then |
|
|
|
file_string="$(cat "$template_file" | sed "s/socket=//")" |
|
|
|
else |
|
|
|
file_string="$(cat "$template_file")" |
|
|
|
fi |
|
|
|
echo "$file_string" | \ |
|
|
|
sed "s/socket=/socket=$quoted_socket/" | \ |
|
|
|
sed "s/host=/host=$db_local_live_host/" | \ |
|
|
|
sed "s/port=/port=$db_local_live_port/" | \ |
|
|
|