diff --git a/src/teams_bot/pyinfra.py b/src/teams_bot/pyinfra.py index a22839a..2771f75 100644 --- a/src/teams_bot/pyinfra.py +++ b/src/teams_bot/pyinfra.py @@ -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, diff --git a/src/teams_bot/pyinfra_assets/teams-bot.profile b/src/teams_bot/pyinfra_assets/teams-bot.profile deleted file mode 100644 index 4ed2638..0000000 --- a/src/teams_bot/pyinfra_assets/teams-bot.profile +++ /dev/null @@ -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 -