mirror of
https://github.com/GameServerManagers/LinuxGSM.git
synced 2025-01-08 12:07:37 +08:00
fix: set $USER if missing
$USER is not available in sh which is used by cron.
This commit is contained in:
parent
753eb2a99a
commit
4a02dfd382
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user