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:
parent
c296e6ad87
commit
f4faaa5494
3 changed files with 8 additions and 8 deletions
|
@ -49,7 +49,7 @@ fi
|
|||
# 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
|
||||
|
@ -79,7 +79,7 @@ ynh_backup --src_path="/etc/systemd/system/$app-coturn.service"
|
|||
# BACKUP SYNAPSE DATA
|
||||
#=================================================
|
||||
|
||||
ynh_backup --src_path="$data_path" --is_big=1
|
||||
ynh_backup --src_path="$data_dir" --is_big=1
|
||||
|
||||
#=================================================
|
||||
# BACKUP SYNAPSE LOG
|
||||
|
|
|
@ -58,7 +58,7 @@ ynh_systemd_action --action=restart --service_name=fail2ban
|
|||
#=================================================
|
||||
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
|
||||
|
|
|
@ -240,13 +240,13 @@ ynh_script_progression --message='Managing migrations...'
|
|||
#=================================================
|
||||
|
||||
if [ -e "/var/lib/matrix-$app" ]; then
|
||||
ynh_script_progression --message="Moving data directory to $data_path..." --weight=1
|
||||
if [ -e "$data_path" ]; then
|
||||
old_data_dir_path="$data_path$(date '+%Y%m%d.%H%M%S')"
|
||||
ynh_script_progression --message="Moving data directory to $data_dir..." --weight=1
|
||||
if [ -e "$data_dir" ]; then
|
||||
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"
|
||||
mv "$data_path" "$old_data_dir_path"
|
||||
mv "$data_dir" "$old_data_dir_path"
|
||||
fi
|
||||
mv "/var/lib/matrix-$app" "$data_path"
|
||||
mv "/var/lib/matrix-$app" "$data_dir"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue