fix: call reboot binary directly and drop reboot oneshot unit

Agent-Logs-Url: https://github.com/naturallaw777/staging_alpha/sessions/1d9cb014-ee8b-44f1-9638-67e38cc2417b

Co-authored-by: naturallaw777 <99053422+naturallaw777@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-04-15 16:35:43 +00:00
committed by GitHub
parent 1ce4a2a520
commit 8970e8a689
2 changed files with 2 additions and 12 deletions

View File

@@ -77,8 +77,6 @@ NJALLA_SCRIPT = "/var/lib/njalla/njalla.sh"
INTERNAL_IP_FILE = "/var/lib/secrets/internal-ip"
ZEUS_CONNECT_FILE = "/var/lib/secrets/zeus-connect-url"
REBOOT_UNIT = "sovran-hub-reboot.service"
ONBOARDING_FLAG = "/var/lib/sovran/onboarding-complete"
AUTOLAUNCH_DISABLE_FLAG = "/var/lib/sovran/hub-autolaunch-disabled"
@@ -2054,7 +2052,7 @@ async def api_upgrade_to_server():
# and ports first via the onboarding wizard. Reboot so onboarding runs.
try:
proc = await asyncio.create_subprocess_exec(
"/run/current-system/sw/bin/systemctl", "start", "--no-block", REBOOT_UNIT,
"/run/current-system/sw/bin/reboot",
stdout=asyncio.subprocess.DEVNULL,
stderr=asyncio.subprocess.DEVNULL,
)
@@ -2887,7 +2885,7 @@ async def api_ping():
async def api_reboot():
try:
proc = await asyncio.create_subprocess_exec(
"/run/current-system/sw/bin/systemctl", "start", "--no-block", REBOOT_UNIT,
"/run/current-system/sw/bin/reboot",
stdout=asyncio.subprocess.DEVNULL,
stderr=asyncio.subprocess.DEVNULL,
)

View File

@@ -380,14 +380,6 @@ in
};
};
systemd.services.sovran-hub-reboot = {
description = "Sovran_SystemsOS Reboot";
serviceConfig = {
Type = "oneshot";
ExecStart = "/run/current-system/sw/bin/systemctl reboot";
};
};
environment.systemPackages = [ sovran-hub-web ];
networking.firewall.allowedTCPPorts = [ 8937 60847 ];