Redirect variables during process elevation
This commit is contained in:
parent
d3cae1a4c8
commit
afdc301ad9
2 changed files with 2 additions and 2 deletions
|
@ -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";
|
||||||
|
|
|
@ -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)";
|
||||||
|
|
Loading…
Reference in a new issue