mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-06 05:47:13 +02:00
testing/do-agent: new aport
This commit is contained in:
parent
c367075ce2
commit
3be8743d2d
38
testing/do-agent/APKBUILD
Normal file
38
testing/do-agent/APKBUILD
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
# Contributor: Dhruvin Gandhi <contact@dhru.vin>
|
||||||
|
# Maintainer: Dhruvin Gandhi <contact@dhru.vin>
|
||||||
|
pkgname=do-agent
|
||||||
|
pkgver=3.16.9
|
||||||
|
_git_rev=1bdbf1a95cab594fb29c2d354f71f029e9c8624f
|
||||||
|
pkgrel=0
|
||||||
|
pkgdesc="Collects system metrics from DigitalOcean Droplets"
|
||||||
|
url="https://github.com/digitalocean/do-agent"
|
||||||
|
arch="x86_64" # limited by digital ocean
|
||||||
|
license="Apache-2.0"
|
||||||
|
makedepends="go"
|
||||||
|
install="$pkgname.pre-install"
|
||||||
|
subpackages="$pkgname-doc $pkgname-openrc"
|
||||||
|
source="https://github.com/digitalocean/do-agent/archive/refs/tags/$pkgver/do-agent-$pkgver.tar.gz
|
||||||
|
do-agent.initd
|
||||||
|
do-agent.confd"
|
||||||
|
|
||||||
|
build() {
|
||||||
|
go build -ldflags "-X 'main.version=$pkgver' -X 'main.revision=$_git_rev' -X 'main.buildDate=$(date)'" \
|
||||||
|
-o bin/do-agent ./cmd/do-agent
|
||||||
|
}
|
||||||
|
|
||||||
|
check() {
|
||||||
|
go test -v ./...
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
install -Dm755 bin/do-agent "$pkgdir/usr/sbin/do-agent"
|
||||||
|
install -Dm644 LICENSE "$pkgdir/usr/share/doc/do-agent/LICENSE"
|
||||||
|
install -Dm755 "$srcdir/do-agent.initd" "$pkgdir/etc/init.d/do-agent"
|
||||||
|
install -Dm644 "$srcdir/do-agent.confd" "$pkgdir/etc/conf.d/do-agent"
|
||||||
|
}
|
||||||
|
|
||||||
|
sha512sums="
|
||||||
|
90418343a49fb3312abc63c8913d644a12a44a372a25028cee211dacefe626c35c1586b98a6a50b733ac56db6a2d4f2446349ac66ebc4d2fbed3a179c8e21bf3 do-agent-3.16.9.tar.gz
|
||||||
|
cb89ceeb17767f1cf30055649d7f1fa1496a6a763b23c501a440bea871d6f43abec8901d5ab18d96b170bb95c374c2f5e468fd12496178d218cd13ab299527c4 do-agent.initd
|
||||||
|
3ad8d9223de1c99c1f231ca9b6500f932c14fbea38093d28231c6c805632ae0594dfd20dba678061e07ae13e8b0d20cc79185fd05b17522f69b768178866347c do-agent.confd
|
||||||
|
"
|
2
testing/do-agent/do-agent.confd
Normal file
2
testing/do-agent/do-agent.confd
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
command_args=--syslog
|
||||||
|
rc_need=logger
|
11
testing/do-agent/do-agent.initd
Executable file
11
testing/do-agent/do-agent.initd
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/sbin/openrc-run
|
||||||
|
name="DigitalOcean Monitoring Agent"
|
||||||
|
command=/usr/sbin/do-agent
|
||||||
|
command_user=do-agent
|
||||||
|
command_background=true
|
||||||
|
pidfile="/run/$RC_SVCNAME.pid"
|
||||||
|
start_stop_daemon_args="--exec $RC_SVCNAME"
|
||||||
|
|
||||||
|
depend() {
|
||||||
|
need net
|
||||||
|
}
|
5
testing/do-agent/do-agent.pre-install
Normal file
5
testing/do-agent/do-agent.pre-install
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
adduser -h /dev/null -g do-agent -s /sbin/nologin -SDH do-agent 2>/dev/null
|
||||||
|
|
||||||
|
exit 0
|
Loading…
Reference in New Issue
Block a user