Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
sassanh committed Apr 11, 2024
1 parent 5db763e commit b2a22f0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
5 changes: 5 additions & 0 deletions ubo_app/system/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,11 @@ def bootstrap(*, with_docker: bool = False, for_packer: bool = False) -> None:
check=True,
)

subprocess.run(
['/usr/bin/env', 'systemctl', 'disable', 'userconfig'], # noqa: S603
check=True,
)

reload_daemon()
enable_services()

Expand Down
13 changes: 8 additions & 5 deletions ubo_app/system/system_manager/service_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,14 @@ def lightdm_handler(command: str) -> None:
def system_handler(service: str, command: str) -> str | None:
"""Interact with system services."""
logger = get_logger('system-manager')
try:
if service == 'ssh':
if service == 'ssh':
try:
return ssh_handler(command)
if service == 'lightdm':
except Exception:
logger.exception('Failed to handle SSH command.')
if service == 'lightdm':
try:
return lightdm_handler(command)
except Exception:
logger.exception('Failed to handle SSH command.')
except Exception:
logger.exception('Failed to handle LightDM command.')
return None

0 comments on commit b2a22f0

Please sign in to comment.