[TASK] add archlinux
This commit is contained in:
parent
c9ccf4d10a
commit
26a118d737
|
@ -23,7 +23,7 @@ webroot = "/var/www/html/meshviewer"
|
||||||
enable = true
|
enable = true
|
||||||
# state-version of nodes.json to store cached data,
|
# state-version of nodes.json to store cached data,
|
||||||
# these is the directly collected respondd data
|
# these is the directly collected respondd data
|
||||||
state_path = "/var/lib/collector/state.json"
|
state_path = "/var/lib/yanic/state.json"
|
||||||
|
|
||||||
# Export nodes and graph periodically
|
# Export nodes and graph periodically
|
||||||
save_interval = "5s"
|
save_interval = "5s"
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
pkg/
|
||||||
|
src/
|
||||||
|
yanic*.pkg.tar
|
|
@ -0,0 +1,37 @@
|
||||||
|
# $Id$
|
||||||
|
# Maintainer Geno <geno+ffhb@fireorbit.de>
|
||||||
|
|
||||||
|
pkgname=yanic
|
||||||
|
pkgver=0.1
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc='Yet an nother node info collector'
|
||||||
|
url='https://github.com/FreifunkBremen/yanic'
|
||||||
|
arch=('x86_64' 'i686')
|
||||||
|
makedepends=('git' 'go')
|
||||||
|
backup=("etc/yanic.conf")
|
||||||
|
source=("yanic.conf"
|
||||||
|
"yanic.service")
|
||||||
|
md5sums=('SKIP'
|
||||||
|
'SKIP')
|
||||||
|
|
||||||
|
install='yanic.install'
|
||||||
|
|
||||||
|
prepare () {
|
||||||
|
msg2 "patch config to default http"
|
||||||
|
sed -e 's/\/var\/www\/html\//\/srv\/http\//g' yanic.conf > yanic-tmp.conf
|
||||||
|
sed -e 's/\/opt\/go\/bin/\/usr\/bin/g' yanic.service > yanic-tmp.service
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
msg2 "GOPATH setup"
|
||||||
|
export GOPATH="$srcdir/gopath"
|
||||||
|
export PATH+=":$GOPATH/bin"
|
||||||
|
go get -v -u github.com/FreifunkBremen/yanic/cmd/...
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
install -Dm644 yanic-tmp.conf "$pkgdir/etc/yanic.conf"
|
||||||
|
install -Dm644 yanic-tmp.service "$pkgdir/usr/lib/systemd/system/yanic.service"
|
||||||
|
install -Dsm755 "$GOPATH/bin/yanic" "$pkgdir/usr/bin/yanic"
|
||||||
|
install -Dsm755 "$GOPATH/bin/yanic-query" "$pkgdir/usr/bin/yanic-query"
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
../../../config_example.toml
|
|
@ -0,0 +1,13 @@
|
||||||
|
post_install() {
|
||||||
|
getent group yanic >/dev/null || groupadd yanic
|
||||||
|
getent passwd yanic >/dev/null || useradd -d /var/lib/yanic -g yanic -r -M -s /bin/false yanic
|
||||||
|
|
||||||
|
mkdir -p /srv/http/meshviewer/data /var/lib/yanic
|
||||||
|
chown yanic:yanic /var/lib/yanic /etc/yanic.conf
|
||||||
|
chown yanic:http /srv/http/meshviewer/data
|
||||||
|
chown http:http /srv/http/meshviewer
|
||||||
|
}
|
||||||
|
|
||||||
|
post_upgrade() {
|
||||||
|
systemctl daemon-reload
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
../../init/linux-systemd/yanic.service
|
Loading…
Reference in New Issue