diff options
| author | Giacomo Sanchietti <giacomo.sanchietti@nethesis.it> | 2022-06-20 18:07:37 +0200 |
|---|---|---|
| committer | Rosen Penev <rosenp@gmail.com> | 2022-07-07 10:34:58 -0700 |
| commit | 7afd539dbf720229fce8f783269e4e5a735cbb5d (patch) | |
| tree | 4eb466515b0c1e5fa4b5f91140ac13b07526231a /admin | |
| parent | c3f6591de7002fd8d20564fd834e887ad9c3d416 (diff) | |
rsyslog: improve default config
Check also for config files containing comment lines starting
with white spaces.
Signed-off-by: Giacomo Sanchietti <giacomo.sanchietti@nethesis.it>
Diffstat (limited to 'admin')
| -rw-r--r-- | admin/rsyslog/files/20_rsyslog | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/admin/rsyslog/files/20_rsyslog b/admin/rsyslog/files/20_rsyslog index 6fd008a06..50fdbaab7 100644 --- a/admin/rsyslog/files/20_rsyslog +++ b/admin/rsyslog/files/20_rsyslog @@ -1,4 +1,6 @@ -[ "$(sed -e '/^#/d' -e '/^\s*$/d' /etc/rsyslog.conf)" != "" ] && exit 0 +#!/bin/sh + +grep -qv -e '^\s*#' -e '^\s*$' /etc/rsyslog.conf 2>/dev/null && exit 0 [ "$(uci -q get rsyslog.syslog)" == "syslog" ] && exit 0 uci -q import rsyslog << EOI |
