2020-12-17 15:28:55 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
2021-07-10 18:27:01 +02:00
|
|
|
email=$(ynh_user_get_info --username=$admin --key=mail)
|
2020-12-17 15:28:55 +01:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# MODIFY URL IN NGINX CONF
|
|
|
|
#=================================================
|
2024-09-02 17:02:53 +02:00
|
|
|
ynh_script_progression "Updating NGINX web server configuration..."
|
2020-12-17 15:28:55 +01:00
|
|
|
|
2024-09-02 17:02:53 +02:00
|
|
|
ynh_config_change_url_nginx
|
2020-12-17 15:28:55 +01:00
|
|
|
|
2024-05-22 13:43:23 +02:00
|
|
|
#=================================================
|
|
|
|
# SPECIFIC MODIFICATIONS
|
|
|
|
#=================================================
|
|
|
|
# RECONFIGURING MATOMO
|
|
|
|
#=================================================
|
2024-09-02 17:02:53 +02:00
|
|
|
ynh_script_progression "Reconfiguring Matomo..."
|
2024-05-22 13:43:23 +02:00
|
|
|
|
|
|
|
if [[ -f "$install_dir/config/config.ini.php" ]]; then
|
2024-09-02 17:02:53 +02:00
|
|
|
# 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
|
|
|
|
|
|
|
|
# See https://matomo.org/faq/how-to-install/faq_18/
|
|
|
|
ynh_replace --match="$old_domain" --replace="$new_domain" --file="$install_dir/config/config.ini.php"
|
2024-05-22 13:43:23 +02:00
|
|
|
fi
|
|
|
|
|
2020-12-17 15:28:55 +01:00
|
|
|
#=================================================
|
|
|
|
# SETUP A CRON
|
|
|
|
#=================================================
|
2024-09-02 17:02:53 +02:00
|
|
|
ynh_script_progression "Setuping a cron..."
|
2020-12-17 15:28:55 +01:00
|
|
|
|
2023-12-19 10:45:26 +01:00
|
|
|
path=$new_path
|
|
|
|
domain=$new_domain
|
|
|
|
|
2024-09-02 17:02:53 +02:00
|
|
|
ynh_config_add --template="cron" --destination="/etc/cron.d/$app"
|
2021-04-28 17:36:41 +02:00
|
|
|
|
2020-12-17 15:28:55 +01:00
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
2024-09-02 17:02:53 +02:00
|
|
|
ynh_script_progression "Change of URL completed for $app"
|