added check to logfile
This commit is contained in:
parent
14e4a6139d
commit
86c10738ce
1 changed files with 17 additions and 13 deletions
|
|
@ -410,6 +410,7 @@ run-and-log(){
|
||||||
}
|
}
|
||||||
|
|
||||||
logger(){
|
logger(){
|
||||||
|
if [ ! -z $logfile ] ; then
|
||||||
if [ ! -f $logfile ] ; then
|
if [ ! -f $logfile ] ; then
|
||||||
run mkdir -p ${rundir%/*}
|
run mkdir -p ${rundir%/*}
|
||||||
touch $logfile
|
touch $logfile
|
||||||
|
|
@ -424,6 +425,9 @@ logger(){
|
||||||
fi
|
fi
|
||||||
done >> $logfile
|
done >> $logfile
|
||||||
)
|
)
|
||||||
|
else
|
||||||
|
$@
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# File handling functions
|
# File handling functions
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue