summaryrefslogtreecommitdiffstats
path: root/packaging
diff options
context:
space:
mode:
authorAustin S. Hemmelgarn <austin@netdata.cloud>2023-03-23 09:45:59 -0400
committerGitHub <noreply@github.com>2023-03-23 09:45:59 -0400
commitc5cad4ecad586db2ff47d64fa5cce45124e6a8a4 (patch)
treef3ac2c29d22650acb4b5f523f3a692f64318abea /packaging
parentc46b8e9fcc614ce08415b00ad4ba617e40b1443e (diff)
Fix handling of logrotate on static installs. (#14792)
* Fix handling of logrotate on static installs. * Correctly fix handling of logrotate config in static builds.
Diffstat (limited to 'packaging')
-rw-r--r--packaging/installer/functions.sh4
-rwxr-xr-xpackaging/makeself/jobs/99-makeself.install.sh1
2 files changed, 3 insertions, 2 deletions
diff --git a/packaging/installer/functions.sh b/packaging/installer/functions.sh
index b79c98aea1..fb37becc72 100644
--- a/packaging/installer/functions.sh
+++ b/packaging/installer/functions.sh
@@ -845,10 +845,12 @@ restart_netdata() {
# install netdata logrotate
install_netdata_logrotate() {
+ src="${NETDATA_PREFIX}/usr/lib/netdata/system/logrotate/netdata"
+
if [ "${UID}" -eq 0 ]; then
if [ -d /etc/logrotate.d ]; then
if [ ! -f /etc/logrotate.d/netdata ]; then
- run cp system/logrotate/netdata /etc/logrotate.d/netdata
+ run cp "${src}" /etc/logrotate.d/netdata
fi
if [ -f /etc/logrotate.d/netdata ]; then
diff --git a/packaging/makeself/jobs/99-makeself.install.sh b/packaging/makeself/jobs/99-makeself.install.sh
index e5f300eb32..ecbf78d417 100755
--- a/packaging/makeself/jobs/99-makeself.install.sh
+++ b/packaging/makeself/jobs/99-makeself.install.sh
@@ -29,7 +29,6 @@ run cp \
packaging/makeself/install-or-update.sh \
packaging/installer/functions.sh \
configs.signatures \
- system/logrotate/netdata \
"${NETDATA_INSTALL_PATH}/system/"
# -----------------------------------------------------------------------------