mirror of
https://github.com/YunoHost-Apps/shaarli_ynh.git
synced 2024-09-03 20:26:10 +02:00
Merge pull request #47 from YunoHost-Apps/fix-the-damn-log-issue
Fix the damn log issue
This commit is contained in:
commit
70c68bd5be
3 changed files with 10 additions and 2 deletions
|
@ -3,7 +3,7 @@
|
|||
"id": "shaarli",
|
||||
"packaging_format": 1,
|
||||
"requirements": {
|
||||
"yunohost": ">= 3.0.0"
|
||||
"yunohost": ">= 3.6.5"
|
||||
},
|
||||
"description": {
|
||||
"en": "The personal, minimalist, super-fast, no-database delicious clone",
|
||||
|
@ -16,7 +16,7 @@
|
|||
},
|
||||
"url": "https://github.com/shaarli/Shaarli",
|
||||
"license": "MIT",
|
||||
"version": "0.10.4~ynh2",
|
||||
"version": "0.10.4~ynh3",
|
||||
"multi_instance": true,
|
||||
"services": [
|
||||
"nginx",
|
||||
|
|
|
@ -152,6 +152,8 @@ ynh_print_info "Configuring log rotation..."
|
|||
### - And the section "SETUP LOGROTATE" in the upgrade script
|
||||
|
||||
# Use logrotate to manage application logfile(s)
|
||||
# We gotta create the file explicitly to avoid triggering https://github.com/YunoHost/issues/issues/1390
|
||||
touch "$final_path/data/log.txt"
|
||||
ynh_use_logrotate "$final_path/data/log.txt"
|
||||
|
||||
|
||||
|
|
|
@ -129,6 +129,12 @@ ynh_add_fpm_config
|
|||
ynh_print_info "Upgrading logrotate configuration..."
|
||||
|
||||
# Use logrotate to manage app-specific logfile(s)
|
||||
# Temporary fix for .txt log file and ynh_use_logrotate
|
||||
if [ -d "$final_path/data/log.txt" ]
|
||||
then
|
||||
rm -r "$final_path/data/log.txt"
|
||||
touch "$final_path/data/log.txt"
|
||||
fi
|
||||
ynh_use_logrotate --non-append
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue