Redirect variables during process elevation

This commit is contained in:
Manuel Thalmann 2023-04-01 17:53:27 +02:00
parent ed625c88c6
commit 0614901e5f
2 changed files with 2 additions and 2 deletions

View file

@ -4,7 +4,7 @@ NEXTCLOUD_DIR="${NEXTCLOUD_DIR}";
# Elevate script # Elevate script
if [ ! "$UID" -eq 0 ] if [ ! "$UID" -eq 0 ]
then then
sudo bash "$BASH_SOURCE" "$USER"; NEXTCLOUD_DIR="${NEXTCLOUD_DIR}" sudo bash "$BASH_SOURCE" "$USER";
else else
homeDir="$(sudo -u "$1" bash -c 'realpath ~')"; homeDir="$(sudo -u "$1" bash -c 'realpath ~')";
fontFileBaseName="Caskaydia Cove Regular Nerd Font Complete.otf"; fontFileBaseName="Caskaydia Cove Regular Nerd Font Complete.otf";

View file

@ -4,7 +4,7 @@ NEXTCLOUD_DIR="${NEXTCLOUD_DIR}";
# Elevate script # Elevate script
if [ ! "$UID" -eq 0 ] if [ ! "$UID" -eq 0 ]
then then
sudo bash "$BASH_SOURCE" "$USER"; NEXTCLOUD_DIR="${NEXTCLOUD_DIR}" sudo bash "$BASH_SOURCE" "$USER";
else else
bin=oh-my-posh; bin=oh-my-posh;
contextRoot="$(mktemp -d)"; contextRoot="$(mktemp -d)";