Skip to content

Harden service installer defaults across Linux distros - #57

Merged
MidnightJava merged 1 commit into
MidnightJava:mainfrom
timoteuszelle:fix/cross-distro-install-service
Jun 30, 2026
Merged

MidnightJava merged 1 commit into
MidnightJava:mainfrom
timoteuszelle:fix/cross-distro-install-service

Conversation

@timoteuszelle

@timoteuszelle timoteuszelle commented Jun 30, 2026 •

Copy link
Copy Markdown
Collaborator

What this PR fixes

  • makes install_service.sh resilient when input/dialout groups are absent by adding only existing groups to useradd
  • ensures ~/.config/systemd/user exists before writing the user service unit
  • falls back to .env-example (or creates an empty env file) when .env is missing
  • fixes README service command typo from fwledmatrix.service to fwledmonitor.service

Root cause and rationale

Installer failures were being hit on some distro variants because setup made assumptions that are not always true:

  • input/dialout groups are always present
  • .env is always present
  • user systemd unit directory already exists

There was also a README service-name mismatch that pointed users to fwledmatrix.service while the installer creates fwledmonitor.service.

This PR hardens installer defaults without changing normal behavior on systems where these assumptions already hold.

Validation

  • bash -n install_service.sh

Related branch (runtime reconnect issue)

  • fix/drawing-thread-reconnect (separated as requested)

@timoteuszelle
timoteuszelle force-pushed the fix/cross-distro-install-service branch from d4de75c to da9568c Compare June 30, 2026 21:35
- make install_service.sh resilient when input/dialout groups are absent
- ensure ~/.config/systemd/user exists before writing user service unit
- fall back to .env-example when .env is missing
- fix README service command typo to fwledmonitor.service
@timoteuszelle
timoteuszelle force-pushed the fix/cross-distro-install-service branch from da9568c to 3557c6d Compare June 30, 2026 21:44

@MidnightJava MidnightJava left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@MidnightJava
MidnightJava merged commit 1da1e61 into MidnightJava:main Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants