summaryrefslogtreecommitdiffstats
path: root/packaging
diff options
context:
space:
mode:
authorDylan Wang <wanghaoyu@frazil.me>2020-03-09 19:44:40 +0800
committerGitHub <noreply@github.com>2020-03-09 07:44:40 -0400
commitfd343ac0c262cd6a1535b67e7894d06760e10259 (patch)
tree97e24c0dcde32a8c8e1595e1ca8755a9d61a9e64 /packaging
parent83a50413a54cf0d0ddb2d42fb445b5607958a0db (diff)
fix installation for ubuntu 14.04 (#7690)
* fix systemd for ubuntu 14.04 * Rename review workflow * Use consistent workflow and job names Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Diffstat (limited to 'packaging')
-rw-r--r--packaging/installer/functions.sh16
1 files changed, 15 insertions, 1 deletions
diff --git a/packaging/installer/functions.sh b/packaging/installer/functions.sh
index e820f6e244..0998a200d7 100644
--- a/packaging/installer/functions.sh
+++ b/packaging/installer/functions.sh
@@ -114,7 +114,7 @@ fetch_and_verify() {
local override=${5}
if [ -z "${override}" ]; then
- get "${url}" > "${tmp}/${base_name}"
+ get "${url}" > "${tmp}/${base_name}"
else
progress "Using provided ${component} archive ${override}"
run cp "${override}" "${tmp}/${base_name}"
@@ -407,6 +407,16 @@ install_netdata_service() {
local uname
uname="$(uname 2> /dev/null)"
+ local key="unknown"
+ if [ -f /etc/os-release ]; then
+ # shellcheck disable=SC1091
+ source /etc/os-release || return 1
+ key="${ID}-${VERSION_ID}"
+
+ elif [ -f /etc/redhat-release ]; then
+ key=$(< /etc/redhat-release)
+ fi
+
if [ "${UID}" -eq 0 ]; then
if [ "${uname}" = "Darwin" ]; then
@@ -446,6 +456,10 @@ install_netdata_service() {
SYSTEMD_DIRECTORY="/etc/systemd/system"
fi
+ if [[ ${key} =~ ^devuan* ]] || [ "${key}" = "debian-7" ] || [ "${key}" = "ubuntu-12.04" ] || [ "${key}" = "ubuntu-14.04" ]; then
+ SYSTEMD_DIRECTORY="/etc/systemd/system"
+ fi
+
if [ "${SYSTEMD_DIRECTORY}x" != "x" ]; then
ENABLE_NETDATA_IF_PREVIOUSLY_ENABLED="run systemctl enable netdata"
IS_NETDATA_ENABLED="$(systemctl is-enabled netdata 2> /dev/null || echo "Netdata not there")"