@cryptotaxi247 / netdata-1 / commits / 89356ea03

add files for fix installation

Costa Tsaousis (ktsaou) committed Mar 28, 2017 at 03:43 UTC 89356ea031f5f0fcb832883c0f365248b060807c
6 files changed +121 -16
makeself/install-or-update.sh new
+52
@@ -0,0 +1,52 @@
1 +#!/usr/bin/env bash
2 +
3 +. $(dirname "${0}")/functions.sh
4 +
5 +progress "Add user netdata to required user groups"
6 +
7 +NETDATA_ADDED_TO_DOCKER=0
8 +NETDATA_ADDED_TO_NGINX=0
9 +NETDATA_ADDED_TO_VARNISH=0
10 +NETDATA_ADDED_TO_HAPROXY=0
11 +NETDATA_ADDED_TO_ADM=0
12 +NETDATA_ADDED_TO_NSD=0
13 +if [ ${UID} -eq 0 ]
14 + then
15 + portable_add_group netdata
16 + portable_add_user netdata
17 + portable_add_user_to_group docker netdata && NETDATA_ADDED_TO_DOCKER=1
18 + portable_add_user_to_group nginx netdata && NETDATA_ADDED_TO_NGINX=1
19 + portable_add_user_to_group varnish netdata && NETDATA_ADDED_TO_VARNISH=1
20 + portable_add_user_to_group haproxy netdata && NETDATA_ADDED_TO_HAPROXY=1
21 + portable_add_user_to_group adm netdata && NETDATA_ADDED_TO_ADM=1
22 + portable_add_user_to_group nsd netdata && NETDATA_ADDED_TO_NSD=1
23 + run_ok
24 +else
25 + run_failed "The installer does not run as root."
26 +fi
27 +
28 +# -----------------------------------------------------------------------------
29 +progress "Install logrotate configuration for netdata"
30 +
31 +if [ ${UID} -eq 0 ]
32 + then
33 + if [ -d /etc/logrotate.d -a ! -f /etc/logrotate.d/netdata ]
34 + then
35 + run cp system/netdata.logrotate /etc/logrotate.d/netdata
36 + fi
37 +
38 + if [ -f /etc/logrotate.d/netdata ]
39 + then
40 + run chmod 644 /etc/logrotate.d/netdata
41 + fi
42 +fi
43 +
44 +# -----------------------------------------------------------------------------
45 +progress "Install netdata at system init"
46 +
47 +if [ "${UID}" -eq 0 ]
48 + then
49 + install_netdata_service
50 +fi
51 +
52 +
makeself/jobs/70-netdata-git.install.sh
+11 -6
@@ -10,10 +10,15 @@ run ./netdata-installer.sh --install /opt --dont-wait --dont-start-it
10 mkdir -p "${NETDATA_INSTALL_PATH}/system"
11
12 cp \
13 - system/netdata-init-d \
14 - system/netdata-lsb \
15 - system/netdata-openrc \
16 - system/netdata.logrotate \
17 - system/netdata.service \
18 - "${NETDATA_INSTALL_PATH}/system/"
13 + system/netdata-init-d \
14 + system/netdata-lsb \
15 + system/netdata-openrc \
16 + system/netdata.logrotate \
17 + system/netdata.service \
18 + "${NETDATA_INSTALL_PATH}/system/"
19
20 +cp \
21 + makeself/post-installer.sh \
22 + makeself/install-or-update.sh \
23 + installer/functions.sh \
24 + "${NETDATA_INSTALL_PATH}/system/"
makeself/jobs/99-makeself.install.sh
+4 -2
@@ -2,6 +2,8 @@
2
3 . $(dirname "${0}")/../functions.sh "${@}" || exit 1
4
5 +
6 +
7 "${NETDATA_MAKESELF_PATH}/makeself.sh" \
8 --gzip \
9 --notemp \
@@ -11,8 +13,8 @@
13 --help-header "${NETDATA_MAKESELF_PATH}/makeself-help-header.txt" \
14 "${NETDATA_INSTALL_PATH}" \
15 "${NETDATA_INSTALL_PATH}.gz.run" \
14 - "LABEL: netdata, real-time performance monitoring" \
15 - ./system/install-or-update.sh \
16 + "netdata, the real-time performance and health monitoring system" \
17 + ./system/post-installer.sh \
18 ${NULL}
19
20
makeself/makeself-help-header.txt
+27 -1
@@ -1,3 +1,29 @@
1 -netdata help header
1 +
2 + ^
3 + |.-. .-. .-. .-. . netdata
4 + | '-' '-' '-' '-' real-time performance monitoring, done right!
5 + +----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+--->
6 +
7 + (C) Copyright 2017, Costa Tsaousis
8 + All rights reserved
9 +
10 + Released under GPL v3+
11 +
12 + You are about to build and install netdata to your system.
13 +
14 + It will be installed at these locations:
15 +
16 + - the daemon at /opt/netdata/usr/sbin/netdata
17 + - config files in /opt/netdata/etc/netdata
18 + - web files in /opt/netdata/usr/share/netdata
19 + - plugins in /opt/netdata/usr/libexec/netdata
20 + - cache files in /opt/netdata/var/cache/netdata
21 + - db files in /opt/netdata/var/lib/netdata
22 + - log files in /opt/netdata/var/log/netdata
23 + - pid file at /opt/netdata/var/run/netdata.pid
24 +
25 + netdata re-distributes a lot of open source software components.
26 + Check its full license at:
27 + https://github.com/firehol/netdata/blob/master/LICENSE.md
28
29
makeself/makeself-license.txt
+24 -7
@@ -1,11 +1,28 @@
1 -netdata
2 -(C) Copyright 2017, Costa Tsaousis
3 -All rights reserved
1
5 -Released under GPL v3+
2 + ^
3 + |.-. .-. .-. .-. . netdata
4 + | '-' '-' '-' '-' real-time performance monitoring, done right!
5 + +----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+--->
6
7 -netdata re-distributes a lot of open source software components.
8 -Check its full license at:
7 + (C) Copyright 2017, Costa Tsaousis
8 + All rights reserved
9
10 -https://github.com/firehol/netdata/blob/master/LICENSE.md
10 + Released under GPL v3+
11 +
12 + You are about to build and install netdata to your system.
13 +
14 + It will be installed at these locations:
15 +
16 + - the daemon at /opt/netdata/usr/sbin/netdata
17 + - config files in /opt/netdata/etc/netdata
18 + - web files in /opt/netdata/usr/share/netdata
19 + - plugins in /opt/netdata/usr/libexec/netdata
20 + - cache files in /opt/netdata/var/cache/netdata
21 + - db files in /opt/netdata/var/lib/netdata
22 + - log files in /opt/netdata/var/log/netdata
23 + - pid file at /opt/netdata/var/run/netdata.pid
24 +
25 + netdata re-distributes a lot of open source software components.
26 + Check its full license at:
27 + https://github.com/firehol/netdata/blob/master/LICENSE.md
28
makeself/post-installer.sh new
+3
@@ -0,0 +1,3 @@
1 +#!/bin/sh
2 +
3 +./bin/bash system/install-or-update.sh "${@}"