fixes freebsd package
This commit is contained in:
parent
c833c1d5e5
commit
3bd43bfc7a
|
|
@ -12,7 +12,6 @@ builds:
|
|||
binary: unpoller
|
||||
goos:
|
||||
- linux
|
||||
- freebsd
|
||||
goarch:
|
||||
- amd64
|
||||
- "386"
|
||||
|
|
@ -20,8 +19,22 @@ builds:
|
|||
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.builtBy=goreleaser -X "golift.io/version.Version={{.Version}}" -X "golift.io/version.Branch={{.Branch}} ({{.Commit}})" -X "golift.io/version.BuildDate={{.Date}}" -X "golift.io/version.BuildUser=goreleaser" -X "golift.io/version.Revision=1"
|
||||
ignore:
|
||||
- goamd64: v4
|
||||
- goos: freebsd
|
||||
goarch: "386"
|
||||
- id: unpoller-freebsd
|
||||
env:
|
||||
- CGO_ENABLED=0
|
||||
binary: usr/local/bin/unpoller
|
||||
goos:
|
||||
- freebsd
|
||||
goarch:
|
||||
- amd64
|
||||
- arm64
|
||||
- arm
|
||||
goarm:
|
||||
- "7"
|
||||
ldflags:
|
||||
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.builtBy=goreleaser -X "golift.io/version.Version={{.Version}}" -X "golift.io/version.Branch={{.Branch}} ({{.Commit}})" -X "golift.io/version.BuildDate={{.Date}}" -X "golift.io/version.BuildUser=goreleaser" -X "golift.io/version.Revision=1"
|
||||
ignore:
|
||||
- goamd64: v4
|
||||
- id: unpoller-mac
|
||||
env:
|
||||
- CGO_ENABLED=0
|
||||
|
|
@ -98,15 +111,41 @@ archives:
|
|||
- rsrc_windows_*.syso
|
||||
- examples/up.*.example
|
||||
- init/windows/application.ico
|
||||
- id: unpoller-txz
|
||||
- id: unpoller-freebsd-pkg
|
||||
builds:
|
||||
- unpoller
|
||||
- unpoller-freebsd
|
||||
format: tar.xz
|
||||
name_template:
|
||||
wrap_in_directory: false
|
||||
files:
|
||||
- LICENSE
|
||||
- README.md
|
||||
- examples/up.*.example
|
||||
# config files
|
||||
- src: "examples/up.conf.example"
|
||||
dst: "usr/local/etc/unpoller"
|
||||
strip_parent: true
|
||||
- src: "examples/up.json.example"
|
||||
dst: "usr/local/etc/unpoller"
|
||||
strip_parent: true
|
||||
- src: "examples/up.yaml.example"
|
||||
dst: "usr/local/etc/unpoller"
|
||||
strip_parent: true
|
||||
# docs
|
||||
- src: "README.html"
|
||||
dst: "usr/local/share/doc/unpoller/"
|
||||
strip_parent: true
|
||||
- src: "unpoller_manual.html"
|
||||
dst: "usr/local/share/doc/unpoller/"
|
||||
strip_parent: true
|
||||
- src: LICENSE
|
||||
dst: "usr/local/share/doc/unpoller/"
|
||||
strip_parent: true
|
||||
- src: "unpoller.1.gz"
|
||||
dst: usr/local/share/man/man1
|
||||
strip_parent: true
|
||||
- src: "init/bsd/freebsd.rc.d"
|
||||
dst: usr/local/etc/rc.d
|
||||
strip_parent: true
|
||||
info:
|
||||
mode: 755
|
||||
|
||||
|
||||
dockers:
|
||||
- id: docker-linux-amd64
|
||||
|
|
|
|||
4
Makefile
4
Makefile
|
|
@ -65,5 +65,5 @@ build: clean
|
|||
goreleaser release --rm-dist --skip-validate --skip-publish --skip-sign --debug
|
||||
|
||||
clean:
|
||||
git clean -xdf
|
||||
docker images -f "dangling=true" -q | xargs docker rmi
|
||||
git clean -xdf || true
|
||||
(docker images -f "dangling=true" -q | xargs docker rmi) || true
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ real_name="unpoller"
|
|||
rcvar="unpoller_enable"
|
||||
unpoller_command="/usr/local/bin/${real_name}"
|
||||
unpoller_user="unpoller"
|
||||
unpoller_config="/usr/local/etc/${real_name}/{{CONFIG_FILE}}"
|
||||
unpoller_config="/usr/local/etc/${real_name}/up.conf"
|
||||
pidfile="/var/run/${real_name}/pid"
|
||||
|
||||
# This runs `daemon` as the `unpoller_user` user.
|
||||
|
|
@ -27,6 +27,10 @@ load_rc_config ${name}
|
|||
mkdir -p $(dirname ${pidfile})
|
||||
chown -R $unpoller_user $(dirname ${pidfile})
|
||||
|
||||
# ensure log directory exists
|
||||
mkdir -p /usr/local/var/log/${real_name}
|
||||
chown -R $unpoller_user /usr/local/var/log/${real_name}
|
||||
|
||||
# Suck in optional exported override variables.
|
||||
# ie. add something like the following to this file: export UP_POLLER_DEBUG=true
|
||||
[ -f "/usr/local/etc/defaults/${real_name}" ] && . "/usr/local/etc/defaults/${real_name}"
|
||||
|
|
|
|||
Loading…
Reference in New Issue