Closed CodeShakingSheep closed 5 months ago
!testme
Apparently there is an issue with the internal sed command used by ynh_replace_string
. Here is the relevant log part:
3746 INFO INFO - [########++++++......] > Reconfiguring Matomo...
3747 INFO DEBUG - + ynh_replace_string '--match_string=trusted_hosts[] = "sub.domain.tld"' '--replace_string=trusted_hosts[] = "sub.domain.tld"' --target_file=/var/www/matomo/config/config.ini.php
3747 INFO DEBUG - + sed --in-place 'strusted_hosts[] = "sub.domain.tld"trusted_hosts[] = "sub.domain.tld"g' /var/www/matomo/config/config.ini.php
3747 INFO WARNING - sed: -e expression #1, char 73: unterminated `s' command
3747 INFO DEBUG - + ynh_exit_properly
This is the command I used:
ynh_replace_string --match_string="trusted_hosts[] = \"$old_domain\"" --replace_string="trusted_hosts[] = \"$new_domain\"" --target_file="$install_dir/config/config.ini.php"
I thought, I had to escape the quotes but may be there is something wrong with it? Any idea @ericgaspar @alexAubin ?
!testme
!testme
4190 INFO WARNING - sed: can't read /var/www/matomo/config/config.ini.php: No such file or directory
Related to this: https://github.com/YunoHost-Apps/matomo_ynh/blob/master/scripts/upgrade#L26 ?
# config.ini.php is only created during the post-install process...
# it is therefore not present when the CI tests are carried out...
# This condition is only for CI test to go through the upgrade process
What do you think @Tagadda @ericgaspar ?
!testme
!testme
Problem
Recently, I changed the URL of my Matomo app. Afterwards the new URL hadn't been added to trusted_hosts. See FAQ here: https://matomo.org/faq/how-to-install/faq_18/ Same as here: Fix https://github.com/YunoHost-Apps/matomo_ynh/issues/114
Solution
So, I just updated
trusted_hosts[]
value inconfig/config.ini-php
with the new URL.PR Status
Automatic tests
Automatic tests can be triggered on https://ci-apps-dev.yunohost.org/ after creating the PR, by commenting "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!". (N.B. : for this to work you need to be a member of the Yunohost-Apps organization)