summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorAustin S. Hemmelgarn <austin@netdata.cloud>2020-09-15 07:40:05 -0400
committerGitHub <noreply@github.com>2020-09-15 07:40:05 -0400
commit59a2aec9c8fb2dfbcfe80668571c39cc08af770c (patch)
tree76f6e5ec9524c51161016a4724a6faffe8946df4 /system
parent0d8972d9c1809e3b68efbe3b1634d6f064f6de7c (diff)
Added support for using `/etc/cron.d` for auto-updates. (#9598)
* Add crontab fragment for netdata updater. This adds a crontab fragment to be put in `/etc/cron.d` on system swhich do not support either `/etc/cron.daily` or `/etc/periodic/daily`, allowing for proper auto-updater support on such systems. The crontab will run upates at 02:57, which was chosen arbitrarily because it does not conflict with th erun times for any major distribution's daily scheduled tasks. * Utilize the crontab fragment for updates on systems that need it. This adds logic to utilize the crontab fragment added by the previous commit on systems which need it for auto-updates to work. The installer will preferentially use `/etc/cron.daily` or `/etc/periodic/daily` instead if they exist, so this should result in no changes for most users. * Remove systemd scheduler detection. We're not actually using it right now, and it breaks handling of auto-updates on systemd systems.
Diffstat (limited to 'system')
-rw-r--r--system/Makefile.am3
-rw-r--r--system/netdata.crontab.in1
2 files changed, 4 insertions, 0 deletions
diff --git a/system/Makefile.am b/system/Makefile.am
index babad46990..6b9e8f7f7e 100644
--- a/system/Makefile.am
+++ b/system/Makefile.am
@@ -12,6 +12,7 @@ CLEANFILES = \
netdata-lsb \
netdata-freebsd \
netdata.plist \
+ netdata.crontab \
$(NULL)
include $(top_srcdir)/build/subst.inc
@@ -34,6 +35,7 @@ nodist_noinst_DATA = \
netdata-lsb \
netdata-freebsd \
netdata.plist \
+ netdata.crontab \
$(NULL)
dist_noinst_DATA = \
@@ -47,4 +49,5 @@ dist_noinst_DATA = \
netdata-freebsd.in \
netdata.plist.in \
netdata.conf \
+ netdata.crontab.in \
$(NULL)
diff --git a/system/netdata.crontab.in b/system/netdata.crontab.in
new file mode 100644
index 0000000000..8f0527e0e0
--- /dev/null
+++ b/system/netdata.crontab.in
@@ -0,0 +1 @@
+2 57 * * * root @pkglibexecdir_POST@/netdata-updater.sh