Add a service to initialise the user session and rename the xdummy service

This commit is contained in:
Héctor Molinero Fernández
2023-04-27 21:05:09 +02:00
parent dae5769065
commit fe0f37139f
13 changed files with 56 additions and 22 deletions

View File

@@ -86,9 +86,14 @@ if [ ! -d /run/user/"${UNPRIVILEGED_USER_UID:?}"/ ]; then
chown "${UNPRIVILEGED_USER_NAME:?}:" /run/user/"${UNPRIVILEGED_USER_UID:?}"/
fi
# Enable xdummy service if ENABLE_XDUMMY is true
if [ "${ENABLE_XDUMMY:?}" = 'true' ]; then
ln -s /etc/sv/xdummy /etc/service/
# Enable xrdp bootstrap service
if [ "${SERVICE_XRDP_BOOTSTRAP_ENABLED:?}" = 'true' ]; then
ln -s /etc/sv/xrdp-bootstrap "${SVDIR:?}"
fi
# Enable headless X server service
if [ "${SERVICE_XORG_HEADLESS_ENABLED:?}" = 'true' ]; then
ln -s /etc/sv/xorg-headless "${SVDIR:?}"
fi
# Generate SSH keys if they do not exist
@@ -120,4 +125,4 @@ openssl x509 -in "${XRDP_TLS_CRT_PATH:?}" -noout -fingerprint -sha256
env | grep -Ev '^(PWD|OLDPWD|HOME|USER|SHELL|TERM|([^=]*(PASSWORD|SECRET)[^=]*))=' | sort > /etc/environment
# Start runit
exec runsvdir -P /etc/service/
exec runsvdir -P "${SVDIR:?}"