2020-01-19 15:16:59 +05:30
|
|
|
#!/bin/sh
|
2022-03-06 05:36:38 +05:30
|
|
|
# shellcheck disable=SC1090
|
2020-01-19 15:16:59 +05:30
|
|
|
if [ x"${srcdir}" = x ]; then
|
|
|
|
srcdir=.
|
|
|
|
fi
|
2021-11-22 19:46:05 +05:30
|
|
|
. ${srcdir}/lib.sh
|
2020-01-19 15:16:59 +05:30
|
|
|
|
2022-03-06 05:36:38 +05:30
|
|
|
cat <<EOF > "${CONF}"
|
2020-01-19 15:16:59 +05:30
|
|
|
# Match all log messages, store in RC5424 format and rotate every 10 MiB
|
|
|
|
*.* -${LOG} ;rotate=10M:5,RFC5424
|
|
|
|
EOF
|
|
|
|
|
2022-03-06 05:26:03 +05:30
|
|
|
setup -m0 >"${LOG2}"
|
2020-01-19 15:16:59 +05:30
|
|
|
|
2022-03-06 05:36:38 +05:30
|
|
|
grep ';RFC5424,rotate=10000000:5' "${LOG2}" || FAIL "Failed parsing RFC5424 .conf"
|
2022-03-06 05:32:03 +05:30
|
|
|
|
|
|
|
OK
|