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

no more changesite option

This commit is contained in:
Kay0u 2020-10-28 20:39:35 +01:00
parent ed63e5ab5d
commit 09c091b53b
No known key found for this signature in database
GPG key ID: AAFEEB16CFA2AE2D
2 changed files with 2 additions and 12 deletions

View file

@ -124,6 +124,8 @@ if [ $change_domain -eq 1 ]
then
# replace SERVER_EMAIL
ynh_replace_string --match_string="noreply@$old_domain" --replace_string="noreply@$new_domain" --target_file="$settings"
# replace SITE_DOMAIN
ynh_replace_string --match_string="SITE_DOMAIN = \"$old_domain\"" --replace_string="SITE_DOMAIN = \"$new_domain\"" --target_file="$settings"
# replace ALLOWED_HOSTS
ynh_replace_string --match_string="ALLOWED_HOSTS = \[\"$old_domain\"\]" --replace_string="ALLOWED_HOSTS = \[\"$new_domain\"\]" --target_file="$settings"
fi
@ -145,17 +147,6 @@ fi
ynh_store_file_checksum --file="$finaluwsgiini"
#=================================================
# ChangeSite inside weblate
#=================================================
ynh_script_progression --message="Run weblate's command changesite..." --time --weight=1
(
set +eu
source "${final_path}/venv/bin/activate"
export DJANGO_SETTINGS_MODULE="weblate.settings"
sudo -u $app $final_path/venv/bin/weblate changesite --set-name "$new_domain"
)
#=================================================
# GENERIC FINALISATION
#=================================================

View file

@ -183,7 +183,6 @@ ynh_script_progression --message="Filling up the database..." --time --weight=1
sudo -u $app $final_path/venv/bin/weblate migrate --noinput
# generate static files
sudo -u $app $final_path/venv/bin/weblate collectstatic --noinput
sudo -u $app $final_path/venv/bin/weblate changesite --set-name "$domain"
sudo -u $app $final_path/venv/bin/weblate createadmin --no-color \
--password "weblate" \
--username "$admin" \