mirror of
https://github.com/YunoHost-Apps/wallabag2_ynh.git
synced 2024-10-01 13:35:06 +02:00
Setup logrotate (#144)
* Setup logrotate * Setup logrotate * Setup logrotate * Setup logrotate * Setup logrotate * bum version number * Auto-update README Co-authored-by: yunohost-bot <yunohost@yunohost.org>
This commit is contained in:
parent
2ea6b8d9c2
commit
95db8cf952
8 changed files with 40 additions and 5 deletions
|
@ -20,8 +20,7 @@ It extracts content so that you can read it when you have time.
|
||||||
|
|
||||||
It provides a web interface, browser (Firefox / Chrome / Opera) add-ons, mobile apps (Android / iOS / Windows Phone) and even on e-reader (PocketBook / Kobo).
|
It provides a web interface, browser (Firefox / Chrome / Opera) add-ons, mobile apps (Android / iOS / Windows Phone) and even on e-reader (PocketBook / Kobo).
|
||||||
|
|
||||||
|
**Shipped version:** 2.5.1~ynh3
|
||||||
**Shipped version:** 2.5.1~ynh2
|
|
||||||
|
|
||||||
**Demo:** https://demo.yunohost.org/wallabag/
|
**Demo:** https://demo.yunohost.org/wallabag/
|
||||||
|
|
||||||
|
|
|
@ -19,8 +19,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
|
||||||
|
|
||||||
Sont disponibles une interface web, des add-ons pour navigateurs (Firefox / Chrome / Opera), des applications pour mobile (Android / iOS / Windows Phone) et même sur liseuse (PocketBook / Kobo).
|
Sont disponibles une interface web, des add-ons pour navigateurs (Firefox / Chrome / Opera), des applications pour mobile (Android / iOS / Windows Phone) et même sur liseuse (PocketBook / Kobo).
|
||||||
|
|
||||||
|
**Version incluse :** 2.5.1~ynh3
|
||||||
**Version incluse :** 2.5.1~ynh2
|
|
||||||
|
|
||||||
**Démo :** https://demo.yunohost.org/wallabag/
|
**Démo :** https://demo.yunohost.org/wallabag/
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"en": "A self hostable read-it-later app",
|
"en": "A self hostable read-it-later app",
|
||||||
"fr": "Une application de lecture-plus-tard auto-hébergeable"
|
"fr": "Une application de lecture-plus-tard auto-hébergeable"
|
||||||
},
|
},
|
||||||
"version": "2.5.1~ynh2",
|
"version": "2.5.1~ynh3",
|
||||||
"url": "https://www.wallabag.org",
|
"url": "https://www.wallabag.org",
|
||||||
"upstream": {
|
"upstream": {
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|
|
@ -55,6 +55,12 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
|
|
||||||
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# BACKUP LOGROTATE
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
ynh_backup --src_path="/etc/logrotate.d/$app"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP FAIL2BAN CONFIGURATION
|
# BACKUP FAIL2BAN CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -158,6 +158,16 @@ ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_fil
|
||||||
|
|
||||||
set_permissions
|
set_permissions
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# SETUP LOGROTATE
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
ynh_script_progression --message="Configuring log rotation..."
|
||||||
|
# Use logrotate to manage application logfile(s)
|
||||||
|
touch "$final_path/var/logs/prod.log"
|
||||||
|
ynh_use_logrotate "$final_path/var/logs/prod.log"
|
||||||
|
chown $app:www-data "$final_path/var/logs/prod.log"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP FAIL2BAN
|
# SETUP FAIL2BAN
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -23,6 +23,14 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD REMOVE
|
# STANDARD REMOVE
|
||||||
|
#=================================================
|
||||||
|
# REMOVE LOGROTATE CONFIGURATION
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Removing logrotate configuration..."
|
||||||
|
|
||||||
|
# Remove the app-specific logrotate config
|
||||||
|
ynh_remove_logrotate
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE THE MYSQL DATABASE
|
# REMOVE THE MYSQL DATABASE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -78,6 +78,13 @@ ynh_script_progression --message="Restoring the PHP-FPM configuration..."
|
||||||
|
|
||||||
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# RESTORE THE LOGROTATE CONFIGURATION
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Restoring the logrotate configuration..."
|
||||||
|
|
||||||
|
ynh_restore_file --origin_path="/etc/logrotate.d/$app"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE FAIL2BAN CONFIGURATION
|
# RESTORE FAIL2BAN CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -186,6 +186,12 @@ ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_fil
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
|
#=================================================
|
||||||
|
# SETUP LOGROTATE
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
ynh_use_logrotate --non-append
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SECURE FILES AND DIRECTORIES
|
# SECURE FILES AND DIRECTORIES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue