Updated ofunctions.sh with userland logging

This commit is contained in:
deajan 2016-04-06 20:13:19 +02:00
parent 8882f17509
commit c21a109f19
1 changed files with 3 additions and 1 deletions

View File

@ -1,4 +1,4 @@
## FUNC_BUILD=2016040302 ## FUNC_BUILD=2016040601
## BEGIN Generic functions for osync & obackup written in 2013-2016 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr ## BEGIN Generic functions for osync & obackup written in 2013-2016 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr
## type -p does not work on platforms other than linux (bash). If if does not work, always assume output is not a zero exitcode ## type -p does not work on platforms other than linux (bash). If if does not work, always assume output is not a zero exitcode
@ -54,6 +54,8 @@ LOCAL_HOST=$(hostname)
## Default log file until config file is loaded ## Default log file until config file is loaded
if [ -w /var/log ]; then if [ -w /var/log ]; then
LOG_FILE="/var/log/$PROGRAM.log" LOG_FILE="/var/log/$PROGRAM.log"
elif ([ "$HOME" != "" ] && [ -w "$HOME" ]); then
LOG_FILE="$HOME/$PROGRAM.log"
else else
LOG_FILE="./$PROGRAM.log" LOG_FILE="./$PROGRAM.log"
fi fi