fix(utilities.sh): fix no such file or directory

Signed-off-by: Dominik Willner th33xitus@gmail.com
This commit is contained in:
th33xitus
2022-04-05 12:30:06 +02:00
parent 5ba3476069
commit 4cc8c33ee3

View File

@@ -80,18 +80,18 @@ function timestamp() {
}
function log_info() {
local message="${1}"
echo -e "$(timestamp) <INFO> ${message}" | tr -s " " >> "${LOGFILE}"
local message="${1}" log="${LOGFILE}"
echo -e "$(timestamp) <INFO> ${message}" | tr -s " " >> "${log}"
}
function log_warning() {
local message="${1}"
echo -e "$(timestamp) <WARN> ${message}" | tr -s " " >> "${LOGFILE}"
local message="${1}" log="${LOGFILE}"
echo -e "$(timestamp) <WARN> ${message}" | tr -s " " >> "${log}"
}
function log_error() {
local message="${1}"
echo -e "$(timestamp) <ERR> ${message}" | tr -s " " >> "${LOGFILE}"
local message="${1}" log="${LOGFILE}"
echo -e "$(timestamp) <ERR> ${message}" | tr -s " " >> "${log}"
}
#================================================#
@@ -112,7 +112,7 @@ function init_ini(){
if [ -f "${INI_FILE}" ] && ! grep -Eq "^# KIAUH v4\.0\.0$" "${INI_FILE}"; then
rm "${INI_FILE}"
fi
### initialize ini file
### initialize v4.0.0 ini file
if [ ! -f "${INI_FILE}" ]; then
{
echo -e "# File creation date: $(date)"