mirror of
https://github.com/YunoHost-Apps/synapse_ynh.git
synced 2024-09-03 20:26:38 +02:00
Add hook to restart synapse at each certificate update
This commit is contained in:
parent
eca523222e
commit
c2e4d0ea5d
4 changed files with 30 additions and 0 deletions
5
hooks/post_cert_update
Normal file
5
hooks/post_cert_update
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ $1 == __DOMAIN__ ]; then
|
||||||
|
systemctl restart matrix-__APP__
|
||||||
|
fi
|
|
@ -80,6 +80,13 @@ ynh_psql_dump_db "$synapse_db_name" > ${YNH_CWD}/dump.sql
|
||||||
|
|
||||||
ynh_backup "/var/log/matrix-$app"
|
ynh_backup "/var/log/matrix-$app"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# BACKUP HOOKS
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
# Copy hook
|
||||||
|
ynh_backup --src_path "/etc/yunohost/hooks.d/post_cert_update/50-$app"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP FAIL2BAN CONFIG
|
# BACKUP FAIL2BAN CONFIG
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -315,6 +315,15 @@ ynh_replace_string __APP__ $app "$final_path/Coturn_config_rotate.sh"
|
||||||
# The script "add_sso_conf.py" will just add en entry for the path "/_matrix" in the sso conf.json.persistent file in the cathegory "skipped_urls".
|
# The script "add_sso_conf.py" will just add en entry for the path "/_matrix" in the sso conf.json.persistent file in the cathegory "skipped_urls".
|
||||||
python3 ../conf/add_sso_conf.py || ynh_die "Your file /etc/ssowat/conf.json.persistent doesn't respect the json syntax. Please fix the syntax to install this app. For more information see here: https://github.com/YunoHost-Apps/synapse_ynh/issues/32"
|
python3 ../conf/add_sso_conf.py || ynh_die "Your file /etc/ssowat/conf.json.persistent doesn't respect the json syntax. Please fix the syntax to install this app. For more information see here: https://github.com/YunoHost-Apps/synapse_ynh/issues/32"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# UPDATE HOOKS
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
# WARNING : theses command are used in INSTALL, UPGRADE
|
||||||
|
# For any update do it in all files
|
||||||
|
ynh_replace_string __APP__ $app ../hooks/post_cert_update
|
||||||
|
ynh_replace_string __DOMAIN__ $domain ../hooks/post_cert_update
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SECURE FILES AND DIRECTORIES
|
# SECURE FILES AND DIRECTORIES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -334,6 +334,15 @@ chmod 600 /etc/matrix-$app/$domain.signing.key
|
||||||
setfacl -R -m user:turnserver:rX /etc/matrix-$app
|
setfacl -R -m user:turnserver:rX /etc/matrix-$app
|
||||||
setfacl -R -m user:turnserver:rwX /var/log/matrix-$app
|
setfacl -R -m user:turnserver:rwX /var/log/matrix-$app
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# UPDATE HOOKS
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
# WARNING : theses command are used in INSTALL, UPGRADE
|
||||||
|
# For any update do it in all files
|
||||||
|
ynh_replace_string __APP__ $app ../hooks/post_cert_update
|
||||||
|
ynh_replace_string __DOMAIN__ $domain ../hooks/post_cert_update
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# UPDATE VERSION SETTINGS
|
# UPDATE VERSION SETTINGS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue