@cryptotaxi247 / netdata-1 / commits / c5cad4eca

Fix handling of logrotate on static installs. (#14792)

* Fix handling of logrotate on static installs. * Correctly fix handling of logrotate config in static builds.

Austin S. Hemmelgarn committed Mar 23, 2023 at 09:45 UTC c5cad4ecad586db2ff47d64fa5cce45124e6a8a4
2 files changed +3 -2
packaging/installer/functions.sh
+3 -1
@@ -845,10 +845,12 @@ restart_netdata() {
845 # install netdata logrotate
846
847 install_netdata_logrotate() {
848 + src="${NETDATA_PREFIX}/usr/lib/netdata/system/logrotate/netdata"
849 +
850 if [ "${UID}" -eq 0 ]; then
851 if [ -d /etc/logrotate.d ]; then
852 if [ ! -f /etc/logrotate.d/netdata ]; then
851 - run cp system/logrotate/netdata /etc/logrotate.d/netdata
853 + run cp "${src}" /etc/logrotate.d/netdata
854 fi
855
856 if [ -f /etc/logrotate.d/netdata ]; then
packaging/makeself/jobs/99-makeself.install.sh
-1
@@ -29,7 +29,6 @@ run cp \
29 packaging/makeself/install-or-update.sh \
30 packaging/installer/functions.sh \
31 configs.signatures \
32 - system/logrotate/netdata \
32 "${NETDATA_INSTALL_PATH}/system/"
33
34 # -----------------------------------------------------------------------------