From 44a48012f02067a26f7a5a5c7beb3686d00a0a78 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zolt=C3=A1n=20Felleg?= Date: Thu, 14 Nov 2024 17:09:59 +0100 Subject: [PATCH] Updated chosta.in (added rsync logging to log server). --- sources/chosta.in/99_setupsystem.sh | 31 +++++++++++++++++++-- sources/chosta.in/etc/logrotate.d/rsync | 8 ++++++ sources/chosta.in/etc/rsyslog.d/remote.conf | 11 ++++++++ 3 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 sources/chosta.in/etc/logrotate.d/rsync create mode 100644 sources/chosta.in/etc/rsyslog.d/remote.conf diff --git a/sources/chosta.in/99_setupsystem.sh b/sources/chosta.in/99_setupsystem.sh index 7624c69..84cd455 100755 --- a/sources/chosta.in/99_setupsystem.sh +++ b/sources/chosta.in/99_setupsystem.sh @@ -5,10 +5,29 @@ hostnamectl set-hostname chosta.in.useribm.hu timedatectl set-timezone Europe/Budapest dnf erase \ + bluez \ + deltarpm \ + dhcp-client \ + f2fs-tools \ + firewalld \ + firewalld-filesystem \ + hunspell \ + jq \ + memstrack \ + ModemManager-glib \ + nano \ + nilfs-utils \ + ntfs-3g \ + ntfs-3g-libs \ + python3-firewall \ + qrencode-libs \ selinux-policy \ + udftools \ + unbound-anchor \ zram-generator dnf install \ + atop \ chrony \ cronie \ git \ @@ -16,14 +35,21 @@ dnf install \ lsof \ lxc \ lxc-templates \ + lxcfs \ mailx \ + man-pages \ postfix \ rsyslog \ + rsyslog-relp \ screen \ + speedtest-cli \ + sysstat \ + tar \ + unzip \ vim-enhanced \ - wget2 + wget2 \ + zip -systemctl disable firewalld.service systemctl disable lxc.service systemctl enable chronyd.service @@ -40,7 +66,6 @@ systemctl start lxcfs.service systemctl start postfix.service systemctl start rsyslog.service -systemctl stop firewalld.service systemctl stop lxc.service git config set --global user.name "Zoltán Felleg" diff --git a/sources/chosta.in/etc/logrotate.d/rsync b/sources/chosta.in/etc/logrotate.d/rsync new file mode 100644 index 0000000..370e4e5 --- /dev/null +++ b/sources/chosta.in/etc/logrotate.d/rsync @@ -0,0 +1,8 @@ +/var/log/rsync.log +{ + missingok + sharedscripts + postrotate + /usr/bin/systemctl reload rsyslog.service >/dev/null 2>&1 || true + endscript +} diff --git a/sources/chosta.in/etc/rsyslog.d/remote.conf b/sources/chosta.in/etc/rsyslog.d/remote.conf new file mode 100644 index 0000000..b645851 --- /dev/null +++ b/sources/chosta.in/etc/rsyslog.d/remote.conf @@ -0,0 +1,11 @@ +module(load="imfile") +module(load="omrelp") + +input(type="imfile" + file="/var/log/rsync.log" + tag="rsync") + +if $syslogtag == "rsync" then { + action(type="omrelp" target="log.in.useribm.hu" port="2514") + stop +} -- 2.54.0