Fix ynh_use_logrotate with getopts

$1 contains --logfile=

Merged as a micro decision.
This commit is contained in:
Maniack Crudelis 2019-04-22 00:27:01 +02:00 committed by GitHub
parent 84c380ab43
commit d11d31dbf2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -55,7 +55,7 @@ ynh_use_logrotate () {
if [ -n "$logfile" ] if [ -n "$logfile" ]
then then
if [ "$(echo ${logfile##*.})" != "log" ]; then # Keep only the extension to check if it's a logfile if [ "$(echo ${logfile##*.})" != "log" ]; then # Keep only the extension to check if it's a logfile
local logfile="$1/*.log" # Else, uses the directory and all logfile into it. local logfile="$logfile/*.log" # Else, uses the directory and all logfile into it.
fi fi
else else
logfile="/var/log/${app}/*.log" # Without argument, use a defaut directory in /var/log logfile="/var/log/${app}/*.log" # Without argument, use a defaut directory in /var/log