From bfe62f03167fda35f223289935b3c79947d92daf Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Sun, 11 Feb 2018 17:44:29 +0100 Subject: [PATCH] Many enhancements on upgrade - Remove useless `| true` on mkdir p - Use ynh_use_logrotate with --non-append argument to recreate the config file - Use $synapse_tls_port instead of 8448 for ynh_check_starting --- scripts/upgrade | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 8946c81..3a1bc0d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -141,10 +141,10 @@ then # WARRNING : theses command are used in INSTALL, UPGRADE # For any update do it in all files - mkdir -p /var/lib/matrix-$app || true # If the dir aready exist the command could fail - mkdir -p /var/log/matrix-$app || true # If the dir aready exist the command could fail - mkdir -p /etc/matrix-$app/conf.d || true # If the dir aready exist the command could fail - mkdir -p $final_path || true # If the dir aready exist the command could fail + mkdir -p /var/lib/matrix-$app + mkdir -p /var/log/matrix-$app + mkdir -p /etc/matrix-$app/conf.d + mkdir -p $final_path fi #================================================= @@ -331,9 +331,7 @@ then # MAKE A CLEAN LOGROTATE CONFIG #================================================= - # Clean logrotate file for all old instances - ynh_remove_logrotate - ynh_use_logrotate /var/log/matrix-$app + ynh_use_logrotate /var/log/matrix-$app --non-append fi #================================================= @@ -412,4 +410,4 @@ ynh_app_setting_set $app synapse_version $upstream_version #================================================= systemctl restart coturn-$app.service -ynh_check_starting "Synapse now listening on port 8448" "/var/log/matrix-$app/homeserver.log" 300 "matrix-$app" +ynh_check_starting "Synapse now listening on port $synapse_tls_port" "/var/log/matrix-$app/homeserver.log" 300 "matrix-$app"