diff --git a/.gitignore b/.gitignore index 729b1bc..ec660e7 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,6 @@ .kateproject .kateproject.d .directory + +*swp + diff --git a/scripts/backup b/scripts/backup index 385a268..d59bea7 100644 --- a/scripts/backup +++ b/scripts/backup @@ -12,6 +12,7 @@ source ../settings/scripts/psql.sh # Retrieve arguments domain=$(ynh_app_setting_get $app special_domain) +final_path="/opt/yunohost/matrix-synapse" # Copy Nginx config 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 ynh_backup "/etc/logrotate.d/$app" "logrotate" +# Copy the logs +ynh_backup "/var/log/matrix-synapse" "log" + # Backup systemd service ynh_backup "/etc/default/matrix-synapse" -ynh_backup "/etc/systemd/system/matrix-synapse.service" \ No newline at end of file +ynh_backup "/etc/systemd/system/matrix-synapse.service" + +# Backup synapse binary +ynh_backup "$final_path" "bin" \ No newline at end of file diff --git a/scripts/restore b/scripts/restore index b61ead4..fd9c16b 100644 --- a/scripts/restore +++ b/scripts/restore @@ -37,12 +37,12 @@ install_dependances # Create user ynh_system_user_create $synapse_user /var/lib/matrix-synapse -# Create directory Install synapse in virtualenv -install_from_source - # Restore all config and data ynh_restore +# Open access to server without a button the home +python $final_path/add_sso_conf.py + # Configure access for certificates set_certificat_access