mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-22 05:55:38 +00:00
LOGGER: fixes for when rdhome is not available
This commit is contained in:
parent
a712300677
commit
ee030900a1
|
@ -9,11 +9,21 @@
|
|||
|
||||
# if [ "${log_init:-false}" = false ]; then
|
||||
# logs_folder=${logs_folder:-"/tmp"}
|
||||
# create_dir $logs_folder
|
||||
# touch "$logs_folder/retrodeck.log"
|
||||
# # exec > >(tee "$logs_folder/retrodeck.log") 2>&1 # this is broken, creates strange artifacts and corrupts the log file
|
||||
# log_init=true
|
||||
# fi
|
||||
|
||||
if [ -z "${rdhome}" ]; then
|
||||
tmp_logs_folder="/tmp/rdlogs"
|
||||
logs_folder="$tmp_logs_folder"
|
||||
create_dir "$logs_folder"
|
||||
elif [ ! -z "${rdhome}" ] && [ -d "$tmp_logs_folder" ]; then
|
||||
cp -f "$tmp_logs_folder/retrodeck.log" "$logs_folder/retrodeck.log"
|
||||
rm -rf "$tmp_logs_folder"
|
||||
fi
|
||||
|
||||
rd_logs_folder="$rdhome/logs"
|
||||
if [ ! -d "$rd_logs_folder" ]; then
|
||||
# this is a one off otherwise it would be logging every time this function is called
|
||||
|
|
Loading…
Reference in a new issue