diff --git a/src/teams_bot/pyinfra.py b/src/teams_bot/pyinfra.py index 30a0305..61497aa 100644 --- a/src/teams_bot/pyinfra.py +++ b/src/teams_bot/pyinfra.py @@ -79,6 +79,12 @@ def deploy_teams_bot( unix_user=unix_user, bot_email=bot_email, ) + + server.shell( + name=f"enable {unix_user}'s systemd units to auto-start at boot", + commands=[f"loginctl enable-linger {unix_user}"], + ) + systemd.daemon_reload( name=f"{unix_user}: load teams-bot systemd service", user_name=unix_user,