From 018daf691b47dd2c7d216147232ed39e84deb9f8 Mon Sep 17 00:00:00 2001 From: "Felix J. Ogris" Date: Thu, 28 Nov 2019 20:46:08 +0100 Subject: [PATCH 1/3] added newsyslog rules for FreeBSD --- config/freebsd/newsyslog/waagent.conf | 1 + setup.py | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 config/freebsd/newsyslog/waagent.conf diff --git a/config/freebsd/newsyslog/waagent.conf b/config/freebsd/newsyslog/waagent.conf new file mode 100644 index 0000000000..31dbb7d078 --- /dev/null +++ b/config/freebsd/newsyslog/waagent.conf @@ -0,0 +1 @@ +/var/log/waagent.log 644 7 * @T00 J /var/run/waagent.pid diff --git a/setup.py b/setup.py index ee0d839231..d3273a271c 100755 --- a/setup.py +++ b/setup.py @@ -150,6 +150,8 @@ def get_data_files(name, version, fullname): elif name == 'freebsd': set_bin_files(data_files, dest="/usr/local/sbin") set_conf_files(data_files, src=["config/freebsd/waagent.conf"]) + set_logrotate_files(data_files, dest="/etc/newsyslog.conf.d", + src=["config/freebsd/newsyslog/waagent.conf"]) set_freebsd_rc_files(data_files) elif name == 'openbsd': set_bin_files(data_files, dest="/usr/local/sbin") From 2b1b75866f738688da49931f99c03f0bf45aa80a Mon Sep 17 00:00:00 2001 From: "Felix J. Ogris" Date: Mon, 10 Feb 2020 20:14:08 +0100 Subject: [PATCH 2/3] not needed, FileAppender always reopens the log file --- config/freebsd/newsyslog/waagent.conf | 1 - 1 file changed, 1 deletion(-) delete mode 100644 config/freebsd/newsyslog/waagent.conf diff --git a/config/freebsd/newsyslog/waagent.conf b/config/freebsd/newsyslog/waagent.conf deleted file mode 100644 index 31dbb7d078..0000000000 --- a/config/freebsd/newsyslog/waagent.conf +++ /dev/null @@ -1 +0,0 @@ -/var/log/waagent.log 644 7 * @T00 J /var/run/waagent.pid From 078dd89085261fb5838dec4d32ab2cc851539a35 Mon Sep 17 00:00:00 2001 From: "Felix J. Ogris" Date: Mon, 10 Feb 2020 20:22:00 +0100 Subject: [PATCH 3/3] rotate log file without signaling waagent as FileAppender always reopens the log file --- config/freebsd/newsyslog/waagent.conf | 1 + 1 file changed, 1 insertion(+) create mode 100644 config/freebsd/newsyslog/waagent.conf diff --git a/config/freebsd/newsyslog/waagent.conf b/config/freebsd/newsyslog/waagent.conf new file mode 100644 index 0000000000..25be9484c5 --- /dev/null +++ b/config/freebsd/newsyslog/waagent.conf @@ -0,0 +1 @@ +/var/log/waagent.log 644 7 * @T00 JN