1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/weblate_ynh.git synced 2024-10-01 13:35:04 +02:00

Remove some warnings

This commit is contained in:
Kay0u 2020-11-03 16:26:23 +01:00
parent 2950375f65
commit 7e1c412536
No known key found for this signature in database
GPG key ID: AAFEEB16CFA2AE2D
3 changed files with 11 additions and 3 deletions

View file

@ -62,7 +62,7 @@ ynh_app_setting_set --app="$app" --key=github_token --value="$github_token"
#=================================================
ynh_script_progression --message="Installing dependencies..." --time --weight=1
ynh_install_app_dependencies "$pkg_dependencies"
ynh_exec_warn_less ynh_install_app_dependencies "$pkg_dependencies"
#=================================================
# CREATE A PostgreSQL DATABASE
@ -188,6 +188,10 @@ ynh_script_progression --message="Filling up the database..." --time --weight=1
--password "weblate" \
--username "$admin" \
--email "$admin_mail"
# Check the configuration
# This may fail in some cases with errors, etc., but the app works and the user can fix issues later.
sudo -u $app $final_path/venv/bin/weblate check --deploy || true
)
#=================================================

View file

@ -82,7 +82,7 @@ chown -R "$app": "$final_path/avatar-cache"
#=================================================
ynh_script_progression --message="Reinstalling dependencies..." --time --weight=1
ynh_install_app_dependencies "$pkg_dependencies"
ynh_exec_warn_less ynh_install_app_dependencies "$pkg_dependencies"
#=================================================
# RESTORE THE PostgreSQL DATABASE
@ -91,6 +91,7 @@ ynh_script_progression --message="Restoring the PostgreSQL database..." --time -
ynh_psql_test_if_first_run
ynh_psql_setup_db --db_user="$db_user" --db_name="$db_name" --db_pwd="$db_pwd"
ynh_psql_execute_as_root --sql="CREATE EXTENSION IF NOT EXISTS pg_trgm;" --database=$db_name
ynh_psql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
#=================================================

View file

@ -103,7 +103,7 @@ ynh_add_nginx_config
#=================================================
ynh_script_progression --message="Upgrading dependencies..." --time --weight=1
ynh_install_app_dependencies "$pkg_dependencies"
ynh_exec_warn_less ynh_install_app_dependencies "$pkg_dependencies"
#=================================================
# CREATE DEDICATED USER
@ -246,6 +246,9 @@ upgrade() {
sudo -u $app $final_path/venv/bin/weblate setuplang
sudo -u $app $final_path/venv/bin/weblate setupgroups
sudo -u $app $final_path/venv/bin/weblate compilemessages
# Check the configuration
# This may fail in some cases with errors, etc., but the app works and the user can fix issues later.
if [ "$new_version" -eq "$weblate_version" ]; then
sudo -u $app $final_path/venv/bin/weblate check --deploy || true
fi