-
Notifications
You must be signed in to change notification settings - Fork 110
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
Change to goreleaser build for generate .deb and also implement journal log #164
Conversation
I think the same rules apply for all distributions (and also docker).
I am a FreeBSD ports maintainer myself and also will not commit any of that integration here. |
Hi, a long story of my case, I have an old ip cam that to send movent alerts use SMTP, but the in this case the old android app only allows 32 characters isn't enough to place the token that the most SMTP providers use as password. It's totally respectful don't include any specific stuff to any distribution (in this case more than distribution it's more than service management, systemd, because Deb it's more a consequence...but) and probably any person that came here probably know sufficient to make this generic binary run like a service or any need... Even can compile to any arch/os that go support. In my case add goreleaser was as proof of concept to use this approach, that includes many distribution package... And add journals to log in systemd ... As said before, another option to log. Probably, to keep learning i'll try to submit to Debian repository. Meanwhile I'll use my Deb in my raspy... Thank for this piece of code, that solve my problem. |
I cannot create packages for most Linux distros myself except the ones I use myself which are currently Alpine Linux and OpenWRT. In addition to that I have also created the port net/smtprelay for FreeBSD. If someone wants to step up and bring smtprelay to his/her favourite distro I'd be glad. |
//go:build linux | ||
|
||
package main | ||
|
||
import ( | ||
"github.com/wercker/journalhook" | ||
) | ||
|
||
func enableLinuxJournal() { | ||
journalhook.Enable() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the changes to have the linux journal where interesting
can they be included ?
[Unit] | ||
Description=smtprelay | ||
Wants=network-online.target | ||
After=network-online.target | ||
|
||
[Service] | ||
User=root | ||
Group=root | ||
WorkingDirectory=/usr/bin | ||
Type=simple | ||
RemainAfterExit=yes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Takes a boolean value that specifies whether the service shall be considered active even when all its processes exited. Defaults to no.
Why did you use yes ?
Hi!
I want to use this relay in my raspberry (in this case) but if power restart in my house, i want that could be a service...
I could do in many ways ... but as proof of concept try to:
What do you think?