File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change 38
38
if [[ " $TELEMETRY " == " true" && ( " $MODE " == " frontend" || " $MODE " == " standalone" ) ]]; then
39
39
cp -r /speedtest/results /var/www/html/results
40
40
41
- sed -i s/\$ db_type\ =\ \' .* \' /\$ db_type\ =\ \' sqlite\'\/ g /var/www/html/results/telemetry_settings.php
41
+ if [ " $DB_TYPE " == " mysql" ]; then
42
+ sed -i ' s/$db_type = ' \' ' .*' \' ' /$db_type = ' \' $DB_TYPE \' ' /g' /var/www/html/results/telemetry_settings.php
43
+ sed -i ' s/$MySql_username = ' \' ' .*' \' ' /$MySql_username = ' \' $DB_USERNAME \' ' /g' /var/www/html/results/telemetry_settings.php
44
+ sed -i ' s/$MySql_password = ' \' ' .*' \' ' /$MySql_password = ' \' $DB_PASSWORD \' ' /g' /var/www/html/results/telemetry_settings.php
45
+ sed -i ' s/$MySql_hostname = ' \' ' .*' \' ' /$MySql_hostname = ' \' $DB_HOSTNAME \' ' /g' /var/www/html/results/telemetry_settings.php
46
+ sed -i ' s/$MySql_databasename = ' \' ' .*' \' ' /$MySql_databasename = ' \' $DB_NAME \' ' /g' /var/www/html/results/telemetry_settings.php
47
+ if [ " $DB_PORT " != " " ]; then
48
+ sed -i ' s/$MySql_port = ' \' ' .*' \' ' /$MySql_port = ' \' $DB_PORT \' ' /g' /var/www/html/results/telemetry_settings.php
49
+ fi
50
+ elif [ " $DB_TYPE " == " postgresql" ]; then
51
+ sed -i ' s/$db_type = ' \' ' .*' \' ' /$db_type = ' \' $DB_TYPE \' ' /g' /var/www/html/results/telemetry_settings.php
52
+ sed -i ' s/$PostgreSql_username = ' \' ' .*' \' ' /$PostgreSql_username = ' \' $DB_USERNAME \' ' /g' /var/www/html/results/telemetry_settings.php
53
+ sed -i ' s/$PostgreSql_password = ' \' ' .*' \' ' /$PostgreSql_password = ' \' $DB_PASSWORD \' ' /g' /var/www/html/results/telemetry_settings.php
54
+ sed -i ' s/$PostgreSql_hostname = ' \' ' .*' \' ' /$PostgreSql_hostname = ' \' $DB_HOSTNAME \' ' /g' /var/www/html/results/telemetry_settings.php
55
+ sed -i ' s/$PostgreSql_databasename = ' \' ' .*' \' ' /$PostgreSql_databasename = ' \' $DB_NAME \' ' /g' /var/www/html/results/telemetry_settings.php
56
+ else
57
+ sed -i s/\$ db_type\ =\ \' .* \' /\$ db_type\ =\ \' sqlite\'\/ g /var/www/html/results/telemetry_settings.php
58
+ fi
59
+
42
60
sed -i s/\$ Sqlite_db_file\ =\ \' .* \' /\$ Sqlite_db_file=\'\\\/ database\\\/ db.sql\' /g /var/www/html/results/telemetry_settings.php
43
61
sed -i s/\$ stats_password\ =\ \' .* \' /\$ stats_password\ =\ \' $PASSWORD \' /g /var/www/html/results/telemetry_settings.php
44
62
You can’t perform that action at this time.
0 commit comments