Skip to content

Commit 2a05918

Browse files
committed
Enable usage of KOLIBRI_HOME as relative path "~/.my_home"
1 parent f3f6329 commit 2a05918

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

debian/startup/kolibri.default

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,22 @@ then
5656
done
5757
fi
5858

59-
# Load user configuration
59+
# Load non-modular final configuration
6060

6161
if [ -e /etc/kolibri/daemon.conf ]
6262
then
6363
. /etc/kolibri/daemon.conf
6464
fi
6565

66+
67+
# It should be possible to use "~/.kolibri" for a relative
68+
# path for Kolibri, but for various reasons, the finally
69+
# exported environment var should be absolute.
70+
#
71+
# Expands ~ in KOLIBRI_HOME to KOLIBRI_USER's HOME
72+
KOLIBRI_USER_HOME="$(getent passwd $KOLIBRI_USER | awk -F ':' '{print $6}')"
73+
KOLIBRI_HOME=${KOLIBRI_HOME//\~/"$KOLIBRI_USER_HOME"}
74+
75+
6676
# Switch off the allexport behavior
6777
set +o allexport

0 commit comments

Comments
 (0)