summaryrefslogtreecommitdiffstats
path: root/makeself/jobs/99-makeself.install.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2018-11-07 12:19:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2018-11-07 12:20:17 +0000
commita64a253794ac64cb40befee54db53bde17dd0d49 (patch)
treec1024acc5f6e508814b944d99f112259bb28b1be /makeself/jobs/99-makeself.install.sh
parentNew upstream version 1.10.0+dfsg (diff)
downloadnetdata-a64a253794ac64cb40befee54db53bde17dd0d49.tar.xz
netdata-a64a253794ac64cb40befee54db53bde17dd0d49.zip
New upstream version 1.11.0+dfsgupstream/1.11.0+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'makeself/jobs/99-makeself.install.sh')
-rwxr-xr-xmakeself/jobs/99-makeself.install.sh29
1 files changed, 5 insertions, 24 deletions
diff --git a/makeself/jobs/99-makeself.install.sh b/makeself/jobs/99-makeself.install.sh
index 698f2f92d..0e0d5c9da 100755
--- a/makeself/jobs/99-makeself.install.sh
+++ b/makeself/jobs/99-makeself.install.sh
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
+# SPDX-License-Identifier: GPL-3.0-or-later
. $(dirname "${0}")/../functions.sh "${@}" || exit 1
@@ -12,18 +13,18 @@ ORIGIN="$(git config --get remote.origin.url || echo "unknown")"
if [[ "${ORIGIN}" =~ ^git@github.com:.*/netdata.*$ ]]
then
NOWNER="${ORIGIN/git@github.com:/}"
- NOWNER="${NOWNER/\/netdata*/}"
+ NOWNER="$( echo ${NOWNER} | cut -d '/' -f 1 )"
elif [[ "${ORIGIN}" =~ ^https://github.com/.*/netdata.*$ ]]
then
NOWNER="${ORIGIN/https:\/\/github.com\//}"
- NOWNER="${NOWNER/\/netdata*/}"
+ NOWNER="$( echo ${NOWNER} | cut -d '/' -f 1 )"
fi
# make sure it does not have any slashes in it
NOWNER="${NOWNER//\//_}"
-if [ "${NOWNER}" = "firehol" ]
+if [ "${NOWNER}" = "netdata" ]
then
NOWNER=
else
@@ -64,6 +65,7 @@ run mv "${NETDATA_INSTALL_PATH}/bin/netdata" \
cat >"${NETDATA_INSTALL_PATH}/bin/netdata" <<EOF
#!${NETDATA_INSTALL_PATH}/bin/bash
+export NETDATA_BASH_LOADABLES="DISABLE"
export PATH="${NETDATA_INSTALL_PATH}/bin:\${PATH}"
exec "${NETDATA_INSTALL_PATH}/bin/srv/netdata" "\${@}"
EOF
@@ -71,27 +73,6 @@ run chmod 755 "${NETDATA_INSTALL_PATH}/bin/netdata"
# -----------------------------------------------------------------------------
-# move etc to protect the destination when unpacked
-
-if [ ! -z "${NETDATA_INSTALL_PATH}" -a -d "${NETDATA_INSTALL_PATH}/etc" ]
- then
- if [ -d "${NETDATA_INSTALL_PATH}/etc.new" ]
- then
- run rm -rf "${NETDATA_INSTALL_PATH}/etc.new" || exit 1
- fi
-
- run mv "${NETDATA_INSTALL_PATH}/etc" \
- "${NETDATA_INSTALL_PATH}/etc.new" || exit 1
-
- if [ -f "${NETDATA_INSTALL_PATH}/etc.new/netdata/netdata.conf" ]
- then
- # delete the generated netdata.conf, so that the static installer will generate a new one
- run rm "${NETDATA_INSTALL_PATH}/etc.new/netdata/netdata.conf"
- fi
-fi
-
-
-# -----------------------------------------------------------------------------
# remove the links to allow untaring the archive
run rm "${NETDATA_INSTALL_PATH}/sbin" \