mirror of
https://github.com/YunoHost-Apps/mautrix_telegram_ynh.git
synced 2024-09-03 19:45:55 +02:00
less warnings
This commit is contained in:
parent
0fd0bb3892
commit
4a4004ade2
3 changed files with 7 additions and 12 deletions
|
@ -176,14 +176,11 @@ $final_path/bin/python3 -m mautrix_telegram -g -c "$mautrix_config_path" -r "$ap
|
|||
# initialize the database
|
||||
# HACK alembic won't find its script dir using a relative path unless when started from $final_path
|
||||
# therefore we replace the script_location
|
||||
ynh_replace_string --match_string="script_location = alembic" \
|
||||
--replace_string="script_location = $final_path/alembic" \
|
||||
--target_file="$final_path/alembic.ini"
|
||||
$final_path/bin/alembic -c "$final_path/alembic.ini" -x config="$mautrix_config_path" upgrade head
|
||||
ynh_replace_string --match_string="script_location = alembic" --replace_string="script_location = $final_path/alembic" --target_file="$final_path/alembic.ini"
|
||||
ynh_exec_warn_less $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
|
||||
/opt/yunohost/matrix-$synapse_instance/update_synapse_for_appservice.sh \
|
||||
|| ynh_die "Synapse can't restart with the appservice configuration"
|
||||
/opt/yunohost/matrix-$synapse_instance/update_synapse_for_appservice.sh || ynh_die --message="Synapse can't restart with the appservice configuration"
|
||||
|
||||
#=================================================
|
||||
# STORE THE CONFIG FILE CHECKSUM
|
||||
|
|
|
@ -100,7 +100,7 @@ ynh_script_progression --message="Removing synapse app service..." --weight=6
|
|||
ynh_secure_remove --file="$app_service_registration_path/$app.yaml"
|
||||
|
||||
/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
|
||||
ynh_secure_remove --file="/var/log/$app"
|
||||
|
|
|
@ -135,10 +135,8 @@ $final_path/bin/python3 -m mautrix_telegram -g -c "$mautrix_config_path" -r "$ap
|
|||
# upgrade the alembic database
|
||||
# TODO remove on next upgrade
|
||||
# ynh_backup_if_checksum_is_different --file="$final_path/alembic.ini"
|
||||
ynh_replace_string --match_string="script_location = alembic" \
|
||||
--replace_string="script_location = $final_path/alembic" \
|
||||
--target_file="$final_path/alembic.ini"
|
||||
$final_path/bin/alembic -c "$final_path/alembic.ini" -x config="$mautrix_config_path" upgrade head
|
||||
ynh_replace_string --match_string="script_location = alembic" --replace_string="script_location = $final_path/alembic" --target_file="$final_path/alembic.ini"
|
||||
ynh_exec_warn_less $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.
|
||||
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
|
||||
|
||||
/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
|
||||
|
|
Loading…
Reference in a new issue