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

Fix undefined vars

This commit is contained in:
Josué Tille 2024-02-21 19:24:15 +01:00
parent c296e6ad87
commit f4faaa5494
No known key found for this signature in database
GPG key ID: 5F259226AD51F2F5
3 changed files with 8 additions and 8 deletions

View file

@ -49,7 +49,7 @@ fi
# BACKUP THE POSTGRESQL DATABASE # BACKUP THE POSTGRESQL DATABASE
#================================================= #=================================================
ynh_psql_dump_db --database="$synapse_db_name" > ${YNH_CWD}/dump.sql ynh_psql_dump_db --database="$db_name" > ${YNH_CWD}/dump.sql
#================================================= #=================================================
# BACKUP FAIL2BAN CONFIGURATION # BACKUP FAIL2BAN CONFIGURATION
@ -79,7 +79,7 @@ ynh_backup --src_path="/etc/systemd/system/$app-coturn.service"
# BACKUP SYNAPSE DATA # BACKUP SYNAPSE DATA
#================================================= #=================================================
ynh_backup --src_path="$data_path" --is_big=1 ynh_backup --src_path="$data_dir" --is_big=1
#================================================= #=================================================
# BACKUP SYNAPSE LOG # BACKUP SYNAPSE LOG

View file

@ -58,7 +58,7 @@ ynh_systemd_action --action=restart --service_name=fail2ban
#================================================= #=================================================
ynh_script_progression --message="Restoring the PostgreSQL database..." --weight=13 ynh_script_progression --message="Restoring the PostgreSQL database..." --weight=13
ynh_psql_execute_file_as_root --file="${YNH_CWD}/dump.sql" --database="$synapse_db_name" ynh_psql_execute_file_as_root --file="${YNH_CWD}/dump.sql" --database="$db_name"
#================================================= #=================================================
# RESTORE SYSTEMD # RESTORE SYSTEMD

View file

@ -240,13 +240,13 @@ ynh_script_progression --message='Managing migrations...'
#================================================= #=================================================
if [ -e "/var/lib/matrix-$app" ]; then if [ -e "/var/lib/matrix-$app" ]; then
ynh_script_progression --message="Moving data directory to $data_path..." --weight=1 ynh_script_progression --message="Moving data directory to $data_dir..." --weight=1
if [ -e "$data_path" ]; then if [ -e "$data_dir" ]; then
old_data_dir_path="$data_path$(date '+%Y%m%d.%H%M%S')" old_data_dir_path="$data_dir$(date '+%Y%m%d.%H%M%S')"
ynh_print_warn "A data directory already exist. Data was renamed to $old_data_dir_path" ynh_print_warn "A data directory already exist. Data was renamed to $old_data_dir_path"
mv "$data_path" "$old_data_dir_path" mv "$data_dir" "$old_data_dir_path"
fi fi
mv "/var/lib/matrix-$app" "$data_path" mv "/var/lib/matrix-$app" "$data_dir"
fi fi
#================================================= #=================================================