less warnings

This commit is contained in:
yalh76 2022-07-16 16:24:51 +02:00
parent 0fd0bb3892
commit 4a4004ade2
3 changed files with 7 additions and 12 deletions

View file

@ -176,14 +176,11 @@ $final_path/bin/python3 -m mautrix_telegram -g -c "$mautrix_config_path" -r "$ap
# initialize the database # initialize the database
# HACK alembic won't find its script dir using a relative path unless when started from $final_path # HACK alembic won't find its script dir using a relative path unless when started from $final_path
# therefore we replace the script_location # therefore we replace the script_location
ynh_replace_string --match_string="script_location = alembic" \ ynh_replace_string --match_string="script_location = alembic" --replace_string="script_location = $final_path/alembic" --target_file="$final_path/alembic.ini"
--replace_string="script_location = $final_path/alembic" \ ynh_exec_warn_less $final_path/bin/alembic -c "$final_path/alembic.ini" -x config="$mautrix_config_path" upgrade head
--target_file="$final_path/alembic.ini"
$final_path/bin/alembic -c "$final_path/alembic.ini" -x config="$mautrix_config_path" upgrade head
# Handled by synapse: synapse_ynh adds all registration files added in $app_service_registration_path to the app_service_config_files list # Handled by synapse: synapse_ynh adds all registration files added in $app_service_registration_path to the app_service_config_files list
/opt/yunohost/matrix-$synapse_instance/update_synapse_for_appservice.sh \ /opt/yunohost/matrix-$synapse_instance/update_synapse_for_appservice.sh || ynh_die --message="Synapse can't restart with the appservice configuration"
|| ynh_die "Synapse can't restart with the appservice configuration"
#================================================= #=================================================
# STORE THE CONFIG FILE CHECKSUM # STORE THE CONFIG FILE CHECKSUM

View file

@ -100,7 +100,7 @@ ynh_script_progression --message="Removing synapse app service..." --weight=6
ynh_secure_remove --file="$app_service_registration_path/$app.yaml" ynh_secure_remove --file="$app_service_registration_path/$app.yaml"
/opt/yunohost/matrix-$synapse_instance/update_synapse_for_appservice.sh \ /opt/yunohost/matrix-$synapse_instance/update_synapse_for_appservice.sh \
|| ynh_die "Synapse can't restart with the appservice configuration" || ynh_die --message="Synapse can't restart with the appservice configuration"
# Remove the log files # Remove the log files
ynh_secure_remove --file="/var/log/$app" ynh_secure_remove --file="/var/log/$app"

View file

@ -135,10 +135,8 @@ $final_path/bin/python3 -m mautrix_telegram -g -c "$mautrix_config_path" -r "$ap
# upgrade the alembic database # upgrade the alembic database
# TODO remove on next upgrade # TODO remove on next upgrade
# ynh_backup_if_checksum_is_different --file="$final_path/alembic.ini" # ynh_backup_if_checksum_is_different --file="$final_path/alembic.ini"
ynh_replace_string --match_string="script_location = alembic" \ ynh_replace_string --match_string="script_location = alembic" --replace_string="script_location = $final_path/alembic" --target_file="$final_path/alembic.ini"
--replace_string="script_location = $final_path/alembic" \ ynh_exec_warn_less $final_path/bin/alembic -c "$final_path/alembic.ini" -x config="$mautrix_config_path" upgrade head
--target_file="$final_path/alembic.ini"
$final_path/bin/alembic -c "$final_path/alembic.ini" -x config="$mautrix_config_path" upgrade head
# Recalculate and store the checksum of the file for the next upgrade. # Recalculate and store the checksum of the file for the next upgrade.
ynh_store_file_checksum --file="$mautrix_config_path" ynh_store_file_checksum --file="$mautrix_config_path"
@ -190,7 +188,7 @@ ynh_systemd_action --service_name=$app --action="start"
ynh_script_progression --message="Reloading synapse server..." --weight=1 ynh_script_progression --message="Reloading synapse server..." --weight=1
/opt/yunohost/matrix-$synapse_instance/update_synapse_for_appservice.sh \ /opt/yunohost/matrix-$synapse_instance/update_synapse_for_appservice.sh \
|| ynh_die "Synapse can't restart with the appservice configuration" || ynh_die --message="Synapse can't restart with the appservice configuration"
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT