diff --git a/selfprivacy_api/actions/system.py b/selfprivacy_api/actions/system.py index e9ac6b4..ef6215d 100644 --- a/selfprivacy_api/actions/system.py +++ b/selfprivacy_api/actions/system.py @@ -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 diff --git a/selfprivacy_api/graphql/mutations/system_mutations.py b/selfprivacy_api/graphql/mutations/system_mutations.py index daada17..f6c77d1 100644 --- a/selfprivacy_api/graphql/mutations/system_mutations.py +++ b/selfprivacy_api/graphql/mutations/system_mutations.py @@ -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",