1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/synapse_ynh.git synced 2024-09-03 20:26:38 +02:00

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
This commit is contained in:
Maniack Crudelis 2018-02-11 17:44:29 +01:00 committed by GitHub
parent e589b8901d
commit bfe62f0316
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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"