From 864c5397bc6359f107caa96a5e53abc234ecf113 Mon Sep 17 00:00:00 2001 From: magikcypress Date: Thu, 20 Apr 2017 17:22:48 +0200 Subject: [PATCH] [fix] install logrotate --- scripts/.fonctions | 2 +- scripts/install | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/.fonctions b/scripts/.fonctions index 7c3041d..32278c4 100644 --- a/scripts/.fonctions +++ b/scripts/.fonctions @@ -139,7 +139,7 @@ ynh_remove_app_dependencies () { # # It's possible to use this helper several times, each config will added to same logrotate config file. ynh_use_logrotate () { - if [ -n "$1" ]; then + if [ "$#" -gt 0 ]; then if [ "$(echo ${1##*.})" == "log" ]; then # Keep only the extension to check if it's a logfile logfile=$1 # In this case, focus logrotate on the logfile else diff --git a/scripts/install b/scripts/install index 4ce713f..d87b1f1 100644 --- a/scripts/install +++ b/scripts/install @@ -141,7 +141,7 @@ sudo systemctl reload nginx sudo yunohost service add mopidy --log "/var/log/${app}/mopidy.log" # Add logrotate -ynh_use_logrotate $app +ynh_use_logrotate # Reload SSOwat configuration sudo yunohost app ssowatconf \ No newline at end of file