Skip to content

Server agent installs always disable sleep/hibernate (--power) - #2584

Open
andrewsbejatto wants to merge 1 commit into
amidaware:developfrom
andrewsbejatto:fix/server-install-power
Open

andrewsbejatto wants to merge 1 commit into
amidaware:developfrom
andrewsbejatto:fix/server-install-power

Conversation

@andrewsbejatto

Copy link
Copy Markdown

Summary

The dashboard only shows the Disable sleep/hibernate option for workstation installs, so every server install went out with power=0. A Windows 10/11 machine used as a server could then go to sleep. Windows Server has no sleep by default, but desktop editions do.

  • New install_power_flag(agent_type, power) in tacticalrmm/utils.py: server always returns 1, workstations keep the requested value (invalid/missing values become 0).
  • Used by install_agent for all methods (exe, powershell, manual/bash command) and by generate_winagent_exe.

Testing

  • tacticalrmm.tests.TestUtils.test_install_power_flag (new).
  • agents.tests.test_agent_installs.test_install_agent: the server exe install now expects power=1, and a workstation install keeps power=0.
  • black --check and flake8 on the changed files.

🤖 Generated with Claude Code

The dashboard only shows the "Disable sleep/hibernate" option for
workstation installs, so a server install always went out with
power=0. A Windows 10/11 machine used as a server could then go to
sleep. Windows Server has no sleep by default, but desktop editions do.

install_power_flag() forces power=1 for server installs and keeps the
requested value for workstations. It is used by install_agent (exe,
powershell and manual/bash commands) and generate_winagent_exe.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@CLAassistant

CLAassistant commented Nov 11, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants