Skip to content

Commit

Permalink
Enable usage of KOLIBRI_HOME as relative path "~/.my_home"
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaoming committed May 6, 2020
1 parent f3f6329 commit 2a05918
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion debian/startup/kolibri.default
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,22 @@ then
done
fi

# Load user configuration
# Load non-modular final configuration

if [ -e /etc/kolibri/daemon.conf ]
then
. /etc/kolibri/daemon.conf
fi


# It should be possible to use "~/.kolibri" for a relative
# path for Kolibri, but for various reasons, the finally
# exported environment var should be absolute.
#
# Expands ~ in KOLIBRI_HOME to KOLIBRI_USER's HOME
KOLIBRI_USER_HOME="$(getent passwd $KOLIBRI_USER | awk -F ':' '{print $6}')"
KOLIBRI_HOME=${KOLIBRI_HOME//\~/"$KOLIBRI_USER_HOME"}


# Switch off the allexport behavior
set +o allexport

0 comments on commit 2a05918

Please sign in to comment.