1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/lutim_ynh.git synced 2024-09-03 19:36:24 +02:00

Update to last standard

This commit is contained in:
maniack 2019-12-09 18:08:42 +01:00
parent e20607b72a
commit 5e5bf7c7a8
4 changed files with 15 additions and 9 deletions

View file

@ -15,7 +15,6 @@
upgrade=1 from_commit=4c29aa94f9d9048411c6e165e122e03574fb9b8d
backup_restore=1
multi_instance=0
incorrect_path=1
port_already_use=1 (8095)
change_url=1
;;; Levels

View file

@ -32,14 +32,21 @@ is_public=$(ynh_app_setting_get $app is_public)
port=$(ynh_app_setting_get $app port)
#=================================================
# CHECK THE SYNTAX OF THE PATHS
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================
ynh_script_progression --message="Check the syntax of the paths"
ynh_script_progression --message="Backing up the app before changing its url (may take a while)..." --weight=20
test -n "$old_path" || old_path="/"
test -n "$new_path" || new_path="/"
new_path=$(ynh_normalize_url_path $new_path)
old_path=$(ynh_normalize_url_path $old_path)
# Backup the current version of the app
ynh_backup_before_upgrade
ynh_clean_setup () {
# Remove the new domain config file, the remove script won't do it as it doesn't know yet its location.
ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf"
# restore it if the upgrade fails
ynh_restore_upgradebackup
}
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
#=================================================
# ACTIVATE MAINTENANCE MODE

View file

@ -185,7 +185,7 @@ ynh_use_logrotate
# ADVERTISE SERVICE IN ADMIN PANEL
#=================================================
yunohost service add lutim -l $final_path/log/production.log
yunohost service add lutim --log $final_path/log/production.log
#=================================================
# SETUP SSOWAT

View file

@ -33,7 +33,7 @@ ynh_remove_systemd_config
#=================================================
# Check if the service is declared in YunoHost
if yunohost service status | grep -q $app
if ynh_exec_fully_quiet yunohost service status $app
then
ynh_print_info "Remove $app service" >&2
yunohost service remove $app