Skip to content

Avoid systemctl enable loop in installer by adding robust service helpers - #137

Open
arun-lmnas wants to merge 1 commit into
pass-v15from
codex/fix-loop-in-mariadb-service-installation
Open

Avoid systemctl enable loop in installer by adding robust service helpers#137
arun-lmnas wants to merge 1 commit into
pass-v15from
codex/fix-loop-in-mariadb-service-installation

Conversation

@arun-lmnas

Copy link
Copy Markdown

Motivation

  • The installer was getting stuck in a loop when trying to systemctl enable services in environments where systemd is not running or behaves differently (containers), so boot-time service enabling must be conditional.
  • The intent is to make the script safely start services during installation while avoiding attempts to enable services at boot in container-style environments where that triggers repeated systemd-sysv-install activity.

Description

  • Add ENABLE_BOOT_SERVICES (default auto) and running_in_container/should_enable_boot_services helpers so boot-time enabling is skipped automatically in containers.
  • Add systemd_available, service_ctl, start_service, restart_service, and enable_service helpers to use systemctl only when available and fall back to service otherwise with timeout protections.
  • Replace direct systemctl enable --now and systemctl restart calls with the new start_service/enable_service/restart_service flows for mariadb and the common services stage.
  • Update recovery/instructions to prefer service status/restart commands where appropriate so they work in non-systemd environments.

Testing

  • Ran bash -n install-frappe-press.sh to validate shell syntax and it succeeded.
  • Ran git diff --check to ensure there are no whitespace/patch problems and it succeeded.
  • Checked for shellcheck but it is not installed in this environment so automated linting was not performed.

Codex Task

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant