Apply last example_ynh

This commit is contained in:
yalh76
2022-06-29 02:17:46 +02:00
parent f28e087a30
commit 219301790e
12 changed files with 172 additions and 83 deletions

View File

@ -32,9 +32,9 @@ port=$(ynh_app_setting_get --app=$app --key=port)
redis_db=$(ynh_app_setting_get --app=$app --key=redis_db)
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
# BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP
#=================================================
ynh_script_progression --message="Backing up $app before changing its URL (may take a while)..." --weight=1
ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=1
# Backup the current version of the app
ynh_backup_before_upgrade
@ -102,6 +102,8 @@ then
ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf"
fi
#=================================================
# SPECIFIC MODIFICATIONS
#=================================================
# ADD A CONFIGURATION
#=================================================
@ -121,7 +123,7 @@ chown $app:$app "$final_path/server/config.js"
ynh_script_progression --message="Starting a systemd service..." --weight=1
# Start a systemd service
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Started"
#=================================================
# RELOAD NGINX