Skip to content

fix(pg-register-service): musl compat, service name, and service path#36

Open
coolaj86 wants to merge 1 commit intomainfrom
fix/serviceman-musl-and-service-name
Open

fix(pg-register-service): musl compat, service name, and service path#36
coolaj86 wants to merge 1 commit intomainfrom
fix/serviceman-musl-and-service-name

Conversation

@coolaj86
Copy link
Copy Markdown
Contributor

Summary

  • serviceman musl fix: Drop @0.x version constraint from the serviceman install URL — libc detection mismatch causes install failure on Alpine/musl systems.
  • Consistent service name: Rename service from postgres-as-$USER to postgres on Linux, matching the macOS behavior.
  • Correct service file path: Detect the init system (launchd / OpenRC / systemd) and print the right service file path instead of hardcoding /etc/systemd/system/.

Test plan

  • Run pg-register-service 5432 on Alpine (OpenRC) — verify serviceman installs and output shows /etc/init.d/postgres
  • Run pg-register-service 5432 on Ubuntu/Debian (systemd) — verify output shows /etc/systemd/system/postgres.service
  • Run pg-register-service 5432 on macOS — verify output shows ~/Library/LaunchAgents/postgres.plist

…name, correct service path

- Drop @0.x version constraint from serviceman install URL — libc
  detection mismatch causes failure on Alpine/musl systems.
- Rename service from postgres-as-$USER to postgres on Linux, matching
  macOS behavior.
- Detect init system (OpenRC vs systemd vs launchd) to print the
  correct service file path instead of hardcoding the systemd path.
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.

1 participant