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

Impove change url, not finished yet

This commit is contained in:
Jean-Baptiste Holcroft 2017-09-28 10:58:49 +02:00
parent ca3582ac02
commit 0f4277e660
2 changed files with 12 additions and 12 deletions

View file

@ -22,7 +22,7 @@
multi_instance=1
incorrect_path=1
port_already_use=0
change_url=0
change_url=1
;;; Levels
Level 1=auto
Level 2=auto

View file

@ -51,15 +51,14 @@ fi
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================
if [ $change_domain -eq 0 ]
then
# The backup process will failed if the domain has changed, because the file settings.yml has already changed
BACKUP_BEFORE_UPGRADE # Backup the current version of the app
ynh_clean_setup () {
BACKUP_FAIL_UPGRADE # restore it if the upgrade fails
}
ynh_abort_if_errors # Active trap pour arrêter le script si une erreur est détectée.
fi
# Backup the current version of the app
ynh_backup_before_upgrade
ynh_clean_setup () {
# restore it if the upgrade fails
ynh_restore_upgradebackup
}
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
#=================================================
# STANDARD MODIFICATIONS
@ -79,7 +78,7 @@ fi
# Change the domain for nginx
if [ $change_domain -eq 1 ]
then
mv "$nginx_conf_path" "/etc/nginx/conf.d/$new_domain.d/$app.conf"
mv "$nginx_conf_path" "/etc/nginx/conf.d/${new_domain}.d/${app}.conf"
fi
#=================================================
@ -118,5 +117,6 @@ fi
#=================================================
# RELOAD NGINX and Weblate
#=================================================
systemctl reload "$app.service"
systemctl reload nginx
systemctl stop "$app.service"
systemctl start "$app.service"