1
0
Fork 0
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:
lapineige 2019-10-19 10:27:07 +02:00 committed by GitHub
commit 70c68bd5be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 2 deletions

View file

@ -3,7 +3,7 @@
"id": "shaarli", "id": "shaarli",
"packaging_format": 1, "packaging_format": 1,
"requirements": { "requirements": {
"yunohost": ">= 3.0.0" "yunohost": ">= 3.6.5"
}, },
"description": { "description": {
"en": "The personal, minimalist, super-fast, no-database delicious clone", "en": "The personal, minimalist, super-fast, no-database delicious clone",
@ -16,7 +16,7 @@
}, },
"url": "https://github.com/shaarli/Shaarli", "url": "https://github.com/shaarli/Shaarli",
"license": "MIT", "license": "MIT",
"version": "0.10.4~ynh2", "version": "0.10.4~ynh3",
"multi_instance": true, "multi_instance": true,
"services": [ "services": [
"nginx", "nginx",

View file

@ -152,6 +152,8 @@ ynh_print_info "Configuring log rotation..."
### - And the section "SETUP LOGROTATE" in the upgrade script ### - And the section "SETUP LOGROTATE" in the upgrade script
# Use logrotate to manage application logfile(s) # 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" ynh_use_logrotate "$final_path/data/log.txt"

View file

@ -129,6 +129,12 @@ ynh_add_fpm_config
ynh_print_info "Upgrading logrotate configuration..." ynh_print_info "Upgrading logrotate configuration..."
# Use logrotate to manage app-specific logfile(s) # 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 ynh_use_logrotate --non-append
#================================================= #=================================================