summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSanskritFritz2016-03-30 23:15:12 +0200
committerSanskritFritz2016-03-30 23:15:12 +0200
commit2f7875f6d7de5bbcf986599ca4756d2882b3e5f9 (patch)
tree0b12136716865c84ed06de66bbba96a2c251883e
parentd007415218d917eeb9421f2078e7c46794756e7b (diff)
downloadaur-2f7875f6d7de5bbcf986599ca4756d2882b3e5f9.tar.gz
Using upstream systemd service file.
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD18
-rw-r--r--netdata-git.install24
-rw-r--r--netdata.service10
4 files changed, 33 insertions, 25 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4d76f14f442..545ab50a3fe 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,8 @@
# Generated by mksrcinfo v8
-# Sat Mar 26 19:21:15 UTC 2016
+# Wed Mar 30 21:14:39 UTC 2016
pkgbase = netdata-git
pkgdesc = Real-time performance monitoring, in the greatest possible detail, over the web.
- pkgver = v1.0.0.r4.ge26c938
+ pkgver = v1.0.0.r22.g8209164
pkgrel = 1
url = https://github.com/firehol/netdata/wiki
install = netdata-git.install
@@ -19,9 +19,7 @@ pkgbase = netdata-git
backup = etc/netdata/charts.d.conf
backup = etc/netdata/apps_groups.conf
source = netdata::git+https://github.com/firehol/netdata
- source = netdata.service
md5sums = SKIP
- md5sums = f94703d50d019ff8693975c16b8a7fe9
pkgname = netdata-git
diff --git a/PKGBUILD b/PKGBUILD
index d6417112c6f..dc922282509 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=netdata-git
_gitname=netdata
-pkgver=v1.0.0.r4.ge26c938
+pkgver=v1.0.0.r22.g8209164
pkgrel=1
pkgdesc="Real-time performance monitoring, in the greatest possible detail, over the web."
url="https://github.com/firehol/netdata/wiki"
@@ -10,8 +10,7 @@ arch=('i686' 'x86_64')
license=('GPL')
depends=('libmnl' 'libnetfilter_acct' 'zlib')
optdepends=('nodejs: Webbox plugin')
-source=("$_gitname::git+https://github.com/firehol/netdata"
- "netdata.service")
+source=("$_gitname::git+https://github.com/firehol/netdata")
provides=('netdata')
conflicts=('netdata')
backup=('etc/netdata/netdata.conf' 'etc/netdata/charts.d.conf' 'etc/netdata/apps_groups.conf')
@@ -23,6 +22,14 @@ pkgver() {
git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
+prepare() {
+ cd "$_gitname"
+ sed -i "s#/usr/sbin/netdata#/usr/bin/netdata#" "system/netdata-systemd"
+ sed -i "s#/bin/kill#/usr/bin/kill#" "system/netdata-systemd"
+ # http://article.gmane.org/gmane.comp.security.firewalls.firehol.devel/898
+ # sed -i "s#<script>var netdataTheme = 'slate';</script>##" "web/index.html"
+}
+
build() {
cd "$_gitname"
@@ -44,8 +51,7 @@ package() {
make DESTDIR="$pkgdir" install
touch "$pkgdir/etc/netdata/netdata.conf"
- install -Dm0644 "$srcdir"/netdata.service "$pkgdir"/usr/lib/systemd/system/netdata.service
+ install -Dm0644 "system/netdata-systemd" "$pkgdir/usr/lib/systemd/system/netdata.service"
}
-md5sums=('SKIP'
- 'f94703d50d019ff8693975c16b8a7fe9')
+md5sums=('SKIP')
diff --git a/netdata-git.install b/netdata-git.install
index 9c2511e600d..9a9f37e8349 100644
--- a/netdata-git.install
+++ b/netdata-git.install
@@ -1,13 +1,27 @@
-post_install() {
- getent group netdata > /dev/null || groupadd -r netdata
- getent passwd netdata > /dev/null || useradd -r -g netdata -c netdata -s /usr/bin/nologin -d / netdata
+chown_netdata() {
chown --recursive netdata:netdata /var/log/netdata
chown --recursive netdata:netdata /var/cache/netdata
chown --recursive netdata:netdata /usr/share/netdata/web
chown --recursive netdata:netdata /etc/netdata
+}
+
+post_install() {
+ getent group netdata > /dev/null || groupadd -r netdata
+ getent passwd netdata > /dev/null || useradd -r -g netdata -c netdata -s /usr/bin/nologin -d / netdata
+
+ chown_netdata
+
+ echo
+ echo "After the daemon has been started for the first time,"
+ echo "download the default config file from"
+ echo "http://127.0.0.1:19999/netdata.conf"
+ echo
+ echo "Copy it to /etc/netdata/ and modify it."
+ echo
+}
- echo "Download the default config file from http://127.0.0.1:19999/netdata.conf"
- echo "after the daemon has been started. Copy it to /etc/netdata/ and modify it."
+post_upgrade() {
+ chown_netdata
}
pre_remove() {
diff --git a/netdata.service b/netdata.service
deleted file mode 100644
index c8c38770d88..00000000000
--- a/netdata.service
+++ /dev/null
@@ -1,10 +0,0 @@
-[Unit]
-Description=Netdata. Real-time performance monitoring.
-
-[Service]
-Type=forking
-ExecStart=/usr/bin/netdata
-ExecStop=/usr/bin/killall netdata
-
-[Install]
-WantedBy=multi-user.target