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

Add rc script for FreeBSD #559

Merged
merged 3 commits into from May 8, 2019
Merged

Conversation

@owatan
Copy link
Contributor

owatan commented May 4, 2019

related: #558

Hi.
I wrote rc script for FreeBSD, so please check this.

- `tar -xzvf mackerel-agent_freebsd_*.tar.gz`
3. Copy `mackerel-agent` to `/usr/local/bin/`.
- `(sudo) cp mackerel-agent /usr/local/bin/`
4. Edit `mackerel-agent.conf`, after copy to `/usr/local/etc/`.

This comment has been minimized.

Copy link
@astj

astj May 5, 2019

Contributor

[nit]

Suggested change
4. Edit `mackerel-agent.conf`, after copy to `/usr/local/etc/`.
4. Edit `mackerel-agent.conf`, then copy it to `/usr/local/etc/`.

This comment has been minimized.

Copy link
@owatan

owatan May 5, 2019

Author Contributor

thanks, I fix it at 67900a9 .

3. Copy `mackerel-agent` to `/usr/local/bin/`.
- `(sudo) cp mackerel-agent /usr/local/bin/`
4. Edit `mackerel-agent.conf`, after copy to `/usr/local/etc/`.
- `${EDITOR} mackerel-agent.conf`

This comment has been minimized.

Copy link
@astj

astj May 5, 2019

Contributor

[nit]
Users may use mackerel-agent.sample.conf as template?

This comment has been minimized.

Copy link
@owatan

owatan May 5, 2019

Author Contributor

I unarchive released file (e.g. mackerel-agent_freebsd_amd64.tar.gz). but it is not included mackerel-agent.sample.conf.
So I wrote not mackerel-agent.sample.conf but mackerel-agent.conf.

$ tar xzvf mackerel-agent_freebsd_amd64.tar.gz 
x mackerel-agent_freebsd_amd64/
x mackerel-agent_freebsd_amd64/CHANGELOG.md
x mackerel-agent_freebsd_amd64/LICENSE
x mackerel-agent_freebsd_amd64/LICENSE.rtf
x mackerel-agent_freebsd_amd64/README.md
x mackerel-agent_freebsd_amd64/mackerel-agent
x mackerel-agent_freebsd_amd64/mackerel-agent.conf

This comment has been minimized.

Copy link
@astj

astj May 8, 2019

Contributor

Oh, sorry for misunderstand. Okay.

- `(sudo) sysrc mackerel_agent_enable="YES"`
- (or `sudoedit /etc/rc.conf`)
7. Start `mackerel_agent`.
- `(sudo) service mackerel_agent start`

This comment has been minimized.

Copy link
@astj

astj May 5, 2019

Contributor

In other OSs we use mackerel-agent as the service name.
I'd like to keep the same name mackerel-agent (, not mackerel_agent) in freebsd. Is it possible?

This comment has been minimized.

Copy link
@owatan

owatan May 5, 2019

Author Contributor

Usually, FreBSD's service name used name_of_service instead of name-of-service.
It is same reason what I added file's name is mackerel_agent.

In FreeBSD, e.g. service mackerel_agent start is execute script mackerel_agent in /usr/local/etc/rc.d/.

(sudo) cp mackerel_agent /usr/local/etc/rc.d/
@astj
astj approved these changes May 8, 2019
@astj

This comment has been minimized.

Copy link
Contributor

astj commented May 8, 2019

LGTM, Thank you!

(One note: This approve / merge does not mean we officially support FreeBSD. *BSD support for mackerel-agent is still non-official.)

@astj astj merged commit 63b8e8a into mackerelio:master May 8, 2019
3 checks passed
3 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage decreased (-0.09%) to 67.233%
Details
@owatan

This comment has been minimized.

Copy link
Contributor Author

owatan commented May 8, 2019

Thank you to merge !

This approve / merge does not mean we officially support FreeBSD

I see, and I understand.

@astj astj mentioned this pull request May 8, 2019
@owatan owatan deleted the owatan:add-freebsd-rc-script branch May 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.