mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-28 06:51:28 +00:00
debug: add prints to rebuild_system
This commit is contained in:
parent
97984d2644
commit
1800c8ecd7
|
@ -60,10 +60,14 @@ def set_auto_upgrade_settings(
|
|||
|
||||
def rebuild_system() -> int:
|
||||
"""Rebuild the system"""
|
||||
print("entered system_actions.rebuild_system")
|
||||
rebuild_result = subprocess.Popen(
|
||||
["systemctl", "start", "sp-nixos-rebuild.service"], start_new_session=True
|
||||
)
|
||||
print("Called subprocess")
|
||||
rebuild_result.communicate()[0]
|
||||
print("Communicated with subproccess, return code:")
|
||||
print(rebuild_result)
|
||||
return rebuild_result.returncode
|
||||
|
||||
|
||||
|
|
|
@ -78,7 +78,9 @@ class SystemMutations:
|
|||
|
||||
@strawberry.mutation(permission_classes=[IsAuthenticated])
|
||||
def run_system_rebuild(self) -> GenericMutationReturn:
|
||||
print("Recieved runSystemRebuild command")
|
||||
system_actions.rebuild_system()
|
||||
print("exited system_actions.rebuild_system")
|
||||
return GenericMutationReturn(
|
||||
success=True,
|
||||
message="Starting rebuild system",
|
||||
|
|
Loading…
Reference in a new issue