This commit is contained in:
ericgaspar 2021-11-18 18:59:50 +01:00
parent d29b11e433
commit eb7bd6cb64
No known key found for this signature in database
GPG Key ID: 574F281483054D44
7 changed files with 38 additions and 3 deletions

View File

@ -19,7 +19,7 @@
"name": "eric_G"
},
"requirements": {
"yunohost": ">= 4.2.4"
"yunohost": ">= 4.3.0"
},
"multi_instance": true,
"services": [

View File

@ -4,7 +4,7 @@
# COMMON VARIABLES
#=================================================
nodejs_version=15
nodejs_version=16
#=================================================
# PERSONAL HELPERS

View File

@ -47,7 +47,11 @@ ynh_backup --src_path="$final_path"
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# SPECIFIC BACKUP
# BACKUP LOGROTATE
#=================================================
ynh_backup --src_path="/etc/logrotate.d/$app"
#=================================================
# BACKUP SYSTEMD
#=================================================

View File

@ -142,6 +142,14 @@ ynh_script_progression --message="Configuring a systemd service..." --weight=1
ynh_add_systemd_config
#=================================================
# SETUP LOGROTATE
#=================================================
ynh_script_progression --message="Configuring log rotation..." --weight=1
# Use logrotate to manage application logfile(s)
ynh_use_logrotate
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================

View File

@ -41,6 +41,14 @@ ynh_script_progression --message="Stopping and removing the systemd service..."
# Remove the dedicated systemd config
ynh_remove_systemd_config
#=================================================
# REMOVE LOGROTATE CONFIGURATION
#=================================================
ynh_script_progression --message="Removing logrotate configuration..." --weight=1
# Remove the app-specific logrotate config
ynh_remove_logrotate
#=================================================
# REMOVE DEPENDENCIES
#=================================================

View File

@ -85,6 +85,13 @@ ynh_script_progression --message="Restoring the systemd configuration..." --weig
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
systemctl enable $app.service --quiet
#=================================================
# RESTORE THE LOGROTATE CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the logrotate configuration..." --weight=1
ynh_restore_file --origin_path="/etc/logrotate.d/$app"
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================

View File

@ -131,6 +131,14 @@ ynh_script_progression --message="Configuring a systemd service..." --weight=2
# Create a dedicated systemd config
ynh_add_systemd_config
#=================================================
# SETUP LOGROTATE
#=================================================
ynh_script_progression --message="Upgrading logrotate configuration..." --weight=1
# Use logrotate to manage app-specific logfile(s)
ynh_use_logrotate --non-append
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================