mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Failed if $1 not set
Because we use set -u, this helper failed if the optional arg is not set
This commit is contained in:
parent
12b223b2f5
commit
f2e656176e
1 changed files with 1 additions and 1 deletions
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# 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
|
||||
|
|
Loading…
Add table
Reference in a new issue