Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use Postgres with serviceman? #298

Open
Tracked by #690
ryanburnette opened this issue Sep 5, 2021 · 1 comment
Open
Tracked by #690

How to use Postgres with serviceman? #298

ryanburnette opened this issue Sep 5, 2021 · 1 comment
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@ryanburnette
Copy link
Member

Can I make postgres a system service in macos with serviceman?

@coolaj86
Copy link
Member

coolaj86 commented Sep 8, 2021

Yes.

# Mac (Login / Launch Agent)
sudo env PATH="$PATH" \
    serviceman add --name postgres --path "${PATH}" --user -- \
    postgres -D "$HOME/.local/share/postgres/var" -p 5432
# Linux (or System Boot / Launch Daemon on Mac)
sudo env PATH="$PATH" \
    serviceman add --name postgres --path "${PATH}" \
      --system --username "$(id -u -n)" --force -- \
    postgres -D "$HOME/.local/share/postgres/var" -p 5432 \
      --unix-socket-directories="$HOME/.local/share/postgres/var/run/"

The --force is necessary because serviceman gets confused thinking that --foo=/bar describes a file (it expects --foo /bar, but that should be fixed).

@coolaj86 coolaj86 self-assigned this Nov 15, 2021
@coolaj86 coolaj86 added the documentation Improvements or additions to documentation label Oct 17, 2023
@coolaj86 coolaj86 changed the title question about Postgres installer How to use Postgres with serviceman? Oct 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants