diff --git a/conf/cron_weblate b/conf/cron_weblate index 42a5032..b0627ab 100644 --- a/conf/cron_weblate +++ b/conf/cron_weblate @@ -1,9 +1,9 @@ # https://docs.weblate.org/en/latest/admin/install.html#production-cron # Fulltext index updates -10 * * * * www-data cd "__FINALPATH__" && source __FINALPATH__/venv/bin/activate && python3 ./manage.py update_index +10 * * * * www-data cd "__FINALPATH__" && source __FINALPATH__/venv/bin/activate && weblate update_index --settings weblate.settings # Cleanup stale objects -@daily cd "__FINALPATH__" && source __FINALPATH__/venv/bin/activate && ./manage.py cleanuptrans +@daily cd "__FINALPATH__" && source __FINALPATH__/venv/bin/activate && weblate cleanuptrans --settings weblate.settings # Commit pending changes after 96 hours -@hourly cd "__FINALPATH__" && source __FINALPATH__/venv/bin/activate && ./manage.py commit_pending --all --age=96 --verbosity=0 +@hourly cd "__FINALPATH__" && source __FINALPATH__/venv/bin/activate && weblate commit_pending --all --age=96 --verbosity=0 --settings weblate.settings diff --git a/scripts/install b/scripts/install index a81e4f8..0763b39 100755 --- a/scripts/install +++ b/scripts/install @@ -83,7 +83,7 @@ ynh_app_setting_set $app db_name $db_name ynh_mysql_setup_db $db_name $db_name # https://docs.weblate.org/en/latest/admin/install.html#unicode-issues-in-mysql -ynh_mysql_execute_as_root "ALTER DATABASE weblate CHARACTER SET utf8mb4;" +ynh_mysql_execute_as_root "ALTER DATABASE $db_name CHARACTER SET utf8mb4;" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -167,9 +167,9 @@ ynh_replace_string "__KEY__" "$key" $final_path/weblate/settings.py #========================================== echo "SPECIFIC SETUP Filling up the database" # set up database -source ${final_path}/venv/bin/activate && $final_path/manage.py migrate --noinput +source ${final_path}/venv/bin/activate && weblate migrate --noinput --settings weblate.settings # generate static files -source ${final_path}/venv/bin/activate && $final_path/manage.py collectstatic --noinput +source ${final_path}/venv/bin/activate && weblate collectstatic --noinput --settings weblate.settings #================================================= # SETUP CRON