fix: set $USER if missing

$USER is not available in sh which is used by cron.
This commit is contained in:
Daniel Gibbs 2023-09-25 20:30:40 +01:00
parent 753eb2a99a
commit 4a02dfd382
No known key found for this signature in database
GPG Key ID: 2076B128385E8C55

View File

@ -816,6 +816,11 @@ if [ ! -d "${lockdir}" ]; then
mkdir -p "${lockdir}"
fi
# if $USER id missing set to whoami
if [ -z "${USER}" ]; then
USER="$(whoami)"
fi
# Calls on-screen messages (bootstrap)
core_messages.sh