summaryrefslogtreecommitdiffstats
path: root/netdata-installer.sh
diff options
context:
space:
mode:
authorMarkos Fountoulakis <44345837+mfundul@users.noreply.github.com>2019-12-19 11:01:59 +0200
committerAndrew Moss <1043609+amoss@users.noreply.github.com>2019-12-19 10:01:59 +0100
commitce9f70d7b3696a54f099628f3337f5c4d5bd1407 (patch)
treed8f0e7bbdd1a070c2dcf619e62c6e5ff4faaccfc /netdata-installer.sh
parentc1436efd00c5b9afdb3779585eb194ea8388a932 (diff)
Agent claiming (#7525)
Initial infrastructure support for agent claiming. This feature is not currently enabled as we are still finalizing the details of the cloud infrastructure w.r.t. agent claiming. The feature will be enabled when we are ready to release it.
Diffstat (limited to 'netdata-installer.sh')
-rwxr-xr-xnetdata-installer.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/netdata-installer.sh b/netdata-installer.sh
index 442b28e87e..e6affc36e5 100755
--- a/netdata-installer.sh
+++ b/netdata-installer.sh
@@ -617,6 +617,7 @@ NETDATA_LOG_DIR="$(config_option "global" "log directory" "${NETDATA_PREFIX}/var
NETDATA_USER_CONFIG_DIR="$(config_option "global" "config directory" "${NETDATA_PREFIX}/etc/netdata")"
NETDATA_STOCK_CONFIG_DIR="$(config_option "global" "stock config directory" "${NETDATA_PREFIX}/usr/lib/netdata/conf.d")"
NETDATA_RUN_DIR="${NETDATA_PREFIX}/var/run"
+NETDATA_CLAIMING_DIR="${NETDATA_USER_CONFIG_DIR}/claim.d"
cat <<OPTIONSEOF
@@ -690,6 +691,15 @@ done
run chmod 755 "${NETDATA_LOG_DIR}"
+# --- claiming dir ----
+
+if [ ! -d "${NETDATA_CLAIMING_DIR}" ]; then
+ echo >&2 "Creating directory '${NETDATA_CLAIMING_DIR}'"
+ run mkdir -p "${NETDATA_CLAIMING_DIR}" || exit 1
+fi
+run chown -R "${NETDATA_USER}:${NETDATA_GROUP}" "${NETDATA_CLAIMING_DIR}"
+run chmod 770 "${NETDATA_CLAIMING_DIR}"
+
# --- plugins ----
if [ "${UID}" -eq 0 ]; then