diff --git a/managed/node-agent/resources/ynp/modules/provision/systemd/templates/run.j2 b/managed/node-agent/resources/ynp/modules/provision/systemd/templates/run.j2 index 874c0b1aaa21..d06e1b5db168 100644 --- a/managed/node-agent/resources/ynp/modules/provision/systemd/templates/run.j2 +++ b/managed/node-agent/resources/ynp/modules/provision/systemd/templates/run.j2 @@ -4,6 +4,7 @@ systemd_dir="/etc/systemd/system" # Enable linger for yb_user su - {{ yb_user }} -c "loginctl enable-linger {{ yb_user }}" su - {{ yb_user }} -c "export XDG_RUNTIME_DIR=/run/user/$(id -u {{ yb_user }})" + echo "export XDG_RUNTIME_DIR=/run/user/$(id -u {{ yb_user }})" >> {{yb_home_dir}}/.bashrc # Configure the systemd_dir as path for user level systemd systemd_dir="{{ yb_home_dir }}/.config/systemd/user" # Ensure the systemd directory exists