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

Merge pull request #148 from YunoHost-Apps/cert_hook

Cert hook
This commit is contained in:
Josue-T 2019-11-08 23:33:51 +01:00 committed by GitHub
commit dbfe7d3ed0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 31 additions and 0 deletions

5
hooks/post_cert_update Normal file
View file

@ -0,0 +1,5 @@
#!/bin/bash
if [ $1 == __DOMAIN__ ]; then
systemctl restart matrix-__APP__
fi

View file

@ -100,6 +100,14 @@ ynh_script_progression --message="Backing up synapse log..." --weight=1
ynh_backup --src_path="/var/log/matrix-$app"
#=================================================
# BACKUP HOOKS
#=================================================
ynh_script_progression --message="Backing up synapse hook..." --weight=1
# Copy hook
ynh_backup --src_path "/etc/yunohost/hooks.d/post_cert_update/50-$app"
#=================================================
# END OF SCRIPT
#=================================================

View file

@ -363,6 +363,15 @@ ynh_script_progression --message="Configuring SSOwat..." --weight=1
# 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 --message="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
#=================================================

View file

@ -381,6 +381,15 @@ chmod 600 /etc/matrix-$app/$server_name.signing.key
setfacl -R -m user:turnserver:rX /etc/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
#=================================================