mirror of
https://github.com/YunoHost-Apps/synapse_ynh.git
synced 2024-09-03 20:26:38 +02:00
Solve Backup / restore Issue
This commit is contained in:
parent
1cace29da5
commit
ba4cadcb04
3 changed files with 14 additions and 4 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -2,3 +2,6 @@
|
||||||
.kateproject
|
.kateproject
|
||||||
.kateproject.d
|
.kateproject.d
|
||||||
.directory
|
.directory
|
||||||
|
|
||||||
|
*swp
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@ source ../settings/scripts/psql.sh
|
||||||
|
|
||||||
# Retrieve arguments
|
# Retrieve arguments
|
||||||
domain=$(ynh_app_setting_get $app special_domain)
|
domain=$(ynh_app_setting_get $app special_domain)
|
||||||
|
final_path="/opt/yunohost/matrix-synapse"
|
||||||
|
|
||||||
# Copy Nginx config
|
# Copy Nginx config
|
||||||
ynh_backup "/etc/nginx/conf.d/${domain}.d/${app}.conf" "nginx.conf"
|
ynh_backup "/etc/nginx/conf.d/${domain}.d/${app}.conf" "nginx.conf"
|
||||||
|
@ -32,6 +33,12 @@ sudo su -c "pg_dump $synapse_db_name" postgres > ${YNH_CWD}/dump.sql
|
||||||
# Copie la configuration de logrotate
|
# Copie la configuration de logrotate
|
||||||
ynh_backup "/etc/logrotate.d/$app" "logrotate"
|
ynh_backup "/etc/logrotate.d/$app" "logrotate"
|
||||||
|
|
||||||
|
# Copy the logs
|
||||||
|
ynh_backup "/var/log/matrix-synapse" "log"
|
||||||
|
|
||||||
# Backup systemd service
|
# Backup systemd service
|
||||||
ynh_backup "/etc/default/matrix-synapse"
|
ynh_backup "/etc/default/matrix-synapse"
|
||||||
ynh_backup "/etc/systemd/system/matrix-synapse.service"
|
ynh_backup "/etc/systemd/system/matrix-synapse.service"
|
||||||
|
|
||||||
|
# Backup synapse binary
|
||||||
|
ynh_backup "$final_path" "bin"
|
|
@ -37,12 +37,12 @@ install_dependances
|
||||||
# Create user
|
# Create user
|
||||||
ynh_system_user_create $synapse_user /var/lib/matrix-synapse
|
ynh_system_user_create $synapse_user /var/lib/matrix-synapse
|
||||||
|
|
||||||
# Create directory Install synapse in virtualenv
|
|
||||||
install_from_source
|
|
||||||
|
|
||||||
# Restore all config and data
|
# Restore all config and data
|
||||||
ynh_restore
|
ynh_restore
|
||||||
|
|
||||||
|
# Open access to server without a button the home
|
||||||
|
python $final_path/add_sso_conf.py
|
||||||
|
|
||||||
# Configure access for certificates
|
# Configure access for certificates
|
||||||
set_certificat_access
|
set_certificat_access
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue