Skip to content

Commit

Permalink
change retrieval of current user (docker runs)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvinSchiller authored Oct 8, 2023
1 parent 57d3179 commit 14ce195
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ DATETIME=$(date +"%Y%m%d_%H%M%S")
SCRIPTNAME="$(basename $0)"
JOB="${SCRIPTNAME}"

CURRENT_USER=$(logname)
HOME_DIR=$(getent passwd $CURRENT_USER | cut -d: -f6)
CURRENT_USER="${SUDO_USER:-$USER}"
HOME_DIR=$(getent passwd "$CURRENT_USER" | cut -d: -f6)

JUKEBOX_HOME_DIR="${HOME_DIR}/RPi-Jukebox-RFID"
LOGDIR="${HOME_DIR}"/phoniebox_logs
Expand Down
4 changes: 2 additions & 2 deletions scripts/installscripts/buster-install-default.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ DATETIME=$(date +"%Y%m%d_%H%M%S")
SCRIPTNAME="$(basename $0)"
JOB="${SCRIPTNAME}"

CURRENT_USER=$(logname)
HOME_DIR=$(getent passwd $CURRENT_USER | cut -d: -f6)
CURRENT_USER="${SUDO_USER:-$USER}"
HOME_DIR=$(getent passwd "$CURRENT_USER" | cut -d: -f6)

JUKEBOX_HOME_DIR="${HOME_DIR}/RPi-Jukebox-RFID"
LOGDIR="${HOME_DIR}"/phoniebox_logs
Expand Down

0 comments on commit 14ce195

Please sign in to comment.