pyinfra: fix paths

This commit is contained in:
missytake 2023-10-08 11:50:43 +02:00
parent e1f01f6ad8
commit 4399da4bf2
2 changed files with 2 additions and 9 deletions

View file

@ -24,7 +24,7 @@ def deploy_teams_bot(unix_user: str, bot_email: str, bot_passwd: str, dbdir: str
if clone_xdcget.changed:
server.script(
name="Setup virtual environment for teams-bot",
src=importlib.resources.files(__package__).joinpath("setup-venv.sh"),
src=importlib.resources.files(__package__) / "pyinfra_assets" / "setup-venv.sh",
_su_user=unix_user,
_use_su_login=True,
)
@ -64,7 +64,7 @@ def deploy_teams_bot(unix_user: str, bot_email: str, bot_passwd: str, dbdir: str
files.template(
name="upload teams-bot systemd unit",
src=importlib.resources.files(__package__).joinpath("teams-bot.service.j2"),
src=importlib.resources.files(__package__) / "pyinfra_assets" / "teams-bot.service.j2",
dest=f"/home/{unix_user}/.config/systemd/user/teams-bot.service",
user=unix_user,
unix_user=unix_user,

View file

@ -1,7 +0,0 @@
export XDG_RUNTIME_DIR="/run/user/$UID"
export DBUS_SESSION_BUS_ADDRESS="unix:path=${XDG_RUNTIME_DIR}/bus"
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm if it exists
[ -s "$HOME/.cargo/env" ] && . "$HOME/.cargo/env" # This loads the cargo environment if it exists
export PATH=$PATH:$HOME/.local/bin