File tree Expand file tree Collapse file tree 4 files changed +8
-4
lines changed
etc/s6-overlay/s6-rc.d/init-syslog-ng-config Expand file tree Collapse file tree 4 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 15
15
&& awk '/^P:syslog-ng$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://' ); \
16
16
fi && \
17
17
apk add -U --upgrade --no-cache \
18
+ grep \
18
19
libdbi-drivers \
19
20
paho-mqtt-c \
20
21
py3-syslog-ng \
Original file line number Diff line number Diff line change 15
15
&& awk '/^P:syslog-ng$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \
16
16
fi && \
17
17
apk add -U --upgrade --no-cache \
18
+ grep \
18
19
libdbi-drivers \
19
20
paho-mqtt-c \
20
21
py3-syslog-ng \
Original file line number Diff line number Diff line change 2
2
# Default syslog-ng.conf file which collects all local logs into a
3
3
# single file called /var/log/messages tailored to container usage.
4
4
5
- @version: 3.35
5
+ @version: 4.1
6
6
@include "scl.conf"
7
7
8
8
source s_local {
27
27
source(s_network_tcp);
28
28
source(s_network_udp);
29
29
destination(d_local);
30
- };
30
+ };
Original file line number Diff line number Diff line change @@ -6,8 +6,10 @@ if [[ ! -f "/config/syslog-ng.conf" ]]; then
6
6
cp -a /defaults/syslog-ng.conf /config/syslog-ng.conf
7
7
fi
8
8
9
- if [[ -f "/config/syslog-ng.conf" ]] && [[ $(grep "@version: 3.29" "/config/syslog-ng.conf") ]]; then
10
- SYSLOG_VERSION=$(syslog-ng --version | grep "Config version" | awk -F ':' '{print $2}' | tr -d '[:space:]')
9
+ CONF_VERSION=$(grep -oP "@version: \K(\d+\.\d+)" "/config/syslog-ng.conf")
10
+ SYSLOG_VERSION=$(syslog-ng --version | grep "Config version" | awk -F ':' '{print $2}' | tr -d '[:space:]')
11
+
12
+ if [[ -f "/config/syslog-ng.conf" ]] && (( $(bc -l <<< "${CONF_VERSION} < ${SYSLOG_VERSION}") )); then
11
13
cat <<-EOF
12
14
********************************************************
13
15
********************************************************
You can’t perform that action at this time.
0 commit comments