diff options
Diffstat (limited to 'usr/share/vdr/systemd/vdr-systemd_helper.sh')
-rw-r--r-- | usr/share/vdr/systemd/vdr-systemd_helper.sh | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/usr/share/vdr/systemd/vdr-systemd_helper.sh b/usr/share/vdr/systemd/vdr-systemd_helper.sh index a605585..f2b3f46 100644 --- a/usr/share/vdr/systemd/vdr-systemd_helper.sh +++ b/usr/share/vdr/systemd/vdr-systemd_helper.sh @@ -20,7 +20,7 @@ unset MAIL include rc-functions include plugin-functions -#init_tmp_dirs +init_tmp_dirs VDR_LOG_FILE="${PL_TMP}/vdr-start-log" @@ -29,18 +29,6 @@ SYSTEMD_ENV_FILE="${PL_TMP}/systemd_env" #common_init -# grep the user on who should vdr systemd running -# 2 values, vdr or root -run_as_user() { -. /etc/systemd/system/vdr.service.d/00-gentoo-vdr-user.conf - - if yesno "${START_VDR_AS_ROOT}"; then - systemd_vdr_user="root" - else - systemd_vdr_user="vdr" - fi -} - # dummy functions to make the rest of gentoo-vdr-scripts happy, # as we do not want to rely on openrc's implementations of these # commands: @@ -102,10 +90,11 @@ if [ "$1" = "--start-pre" ]; then init_params init_plugin_loader start || eexitfail "init_plugin_loader start" load_addons_prefixed pre-start || eexitfail "load_addons_prefixed pre-start" - run_as_user # these options are what we need to start VDR from the systemd unit file echo "VDR_OPTS=\"${vdr_opts}\"" > ${SYSTEMD_ENV_FILE} - echo "SYSTEMD_VDR_USER=\"${sytemd_vdr_user}\"" >> ${SYSTEMD_ENV_FILE} + # remove the command line --user argument if set by the scripts so far, + # as the user under which vdr will run is controlled by systemd + sed -e "s:'-u' 'vdr' ::" -i ${SYSTEMD_ENV_FILE} sync eend "--start-pre" elif [ "$1" = "--start-post" ]; then |