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:
parent
ca3582ac02
commit
0f4277e660
2 changed files with 12 additions and 12 deletions
|
@ -22,7 +22,7 @@
|
||||||
multi_instance=1
|
multi_instance=1
|
||||||
incorrect_path=1
|
incorrect_path=1
|
||||||
port_already_use=0
|
port_already_use=0
|
||||||
change_url=0
|
change_url=1
|
||||||
;;; Levels
|
;;; Levels
|
||||||
Level 1=auto
|
Level 1=auto
|
||||||
Level 2=auto
|
Level 2=auto
|
||||||
|
|
|
@ -51,15 +51,14 @@ fi
|
||||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
if [ $change_domain -eq 0 ]
|
# Backup the current version of the app
|
||||||
then
|
ynh_backup_before_upgrade
|
||||||
# The backup process will failed if the domain has changed, because the file settings.yml has already changed
|
ynh_clean_setup () {
|
||||||
BACKUP_BEFORE_UPGRADE # Backup the current version of the app
|
# restore it if the upgrade fails
|
||||||
ynh_clean_setup () {
|
ynh_restore_upgradebackup
|
||||||
BACKUP_FAIL_UPGRADE # restore it if the upgrade fails
|
}
|
||||||
}
|
# Exit if an error occurs during the execution of the script
|
||||||
ynh_abort_if_errors # Active trap pour arrêter le script si une erreur est détectée.
|
ynh_abort_if_errors
|
||||||
fi
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD MODIFICATIONS
|
# STANDARD MODIFICATIONS
|
||||||
|
@ -79,7 +78,7 @@ fi
|
||||||
# Change the domain for nginx
|
# Change the domain for nginx
|
||||||
if [ $change_domain -eq 1 ]
|
if [ $change_domain -eq 1 ]
|
||||||
then
|
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
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -118,5 +117,6 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX and Weblate
|
# RELOAD NGINX and Weblate
|
||||||
#=================================================
|
#=================================================
|
||||||
systemctl reload "$app.service"
|
|
||||||
systemctl reload nginx
|
systemctl reload nginx
|
||||||
|
systemctl stop "$app.service"
|
||||||
|
systemctl start "$app.service"
|
||||||
|
|
Loading…
Reference in a new issue