From: Zoltán Felleg Date: Thu, 14 Nov 2024 16:13:21 +0000 (+0100) Subject: Updated chostb.in (added rsync logging to log server). X-Git-Url: http://git.useribm.hu/?a=commitdiff_plain;h=4bdb9c49463131e5581d65786ce6240d458327e5;p=user-lxc.git Updated chostb.in (added rsync logging to log server). --- diff --git a/sources/chostb.in/99_setupsystem.sh b/sources/chostb.in/99_setupsystem.sh index 6b24b09..61ab9d5 100755 --- a/sources/chostb.in/99_setupsystem.sh +++ b/sources/chostb.in/99_setupsystem.sh @@ -5,10 +5,29 @@ hostnamectl set-hostname chostb.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/chostb.in/etc/logrotate.d/rsync b/sources/chostb.in/etc/logrotate.d/rsync new file mode 100644 index 0000000..370e4e5 --- /dev/null +++ b/sources/chostb.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/chostb.in/etc/rsyslog.d/remote.conf b/sources/chostb.in/etc/rsyslog.d/remote.conf new file mode 100644 index 0000000..b645851 --- /dev/null +++ b/sources/chostb.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 +} diff --git a/sources/chostb.in/etc/sysconfig/lxc b/sources/chostb.in/etc/sysconfig/lxc new file mode 100644 index 0000000..d184fa0 --- /dev/null +++ b/sources/chostb.in/etc/sysconfig/lxc @@ -0,0 +1,28 @@ +# LXC_AUTO - whether or not to start containers at boot +LXC_AUTO="true" + +# BOOTGROUPS - What groups should start on bootup? +# Comma separated list of groups. +# Leading comma, trailing comma or embedded double +# comma indicates when the NULL group should be run. +# Example (default): boot the onboot group first then the NULL group +BOOTGROUPS="onboot," + +# SHUTDOWNDELAY - Wait time for a container to shut down. +# Container shutdown can result in lengthy system +# shutdown times. Even 5 seconds per container can be +# too long. +SHUTDOWNDELAY=5 + +# OPTIONS can be used for anything else. +# If you want to boot everything then +# options can be "-a" or "-a -A". +OPTIONS="--all" + +# STOPOPTS are stop options. The can be used for anything else to stop. +# If you want to kill containers fast, use -k +STOPOPTS="-a -A -s" + +USE_LXC_BRIDGE="false" # overridden in lxc-net + +[ ! -f /etc/sysconfig/lxc-net ] || . /etc/sysconfig/lxc-net diff --git a/sources/chostb.in/etc/sysconfig/lxc-net b/sources/chostb.in/etc/sysconfig/lxc-net new file mode 100644 index 0000000..501c12e --- /dev/null +++ b/sources/chostb.in/etc/sysconfig/lxc-net @@ -0,0 +1,29 @@ +# Leave USE_LXC_BRIDGE as "true" if you want to use lxcbr0 for your +# containers. Set to "false" if you'll use virbr0 or another existing +# bridge, or macvlan to your host's NIC. +USE_LXC_BRIDGE="false" + +# If you change the LXC_BRIDGE to something other than lxcbr0, then +# you will also need to update your /etc/lxc/default.conf as well as the +# configuration (/var/lib/lxc//config) for any containers +# already created using the default config to reflect the new bridge +# name. +# If you have the dnsmasq daemon installed, you'll also have to update +# /etc/dnsmasq.d/lxc and restart the system wide dnsmasq daemon. +#LXC_BRIDGE="lxcbr0" +#LXC_BRIDGE_MAC="00:16:3e:00:00:00" +#LXC_ADDR="10.0.3.1" +#LXC_NETMASK="255.255.255.0" +#LXC_NETWORK="10.0.3.0/24" +#LXC_DHCP_RANGE="10.0.3.2,10.0.3.254" +#LXC_DHCP_MAX="253" +# Uncomment the next line if you'd like to use a conf-file for the lxcbr0 +# dnsmasq. For instance, you can use 'dhcp-host=mail1,10.0.3.100' to have +# container 'mail1' always get ip address 10.0.3.100. +#LXC_DHCP_CONFILE=/etc/lxc/dnsmasq.conf + +# Uncomment the next line if you want lxcbr0's dnsmasq to resolve the .lxc +# domain. You can then add "server=/lxc/10.0.3.1' (or your actual $LXC_ADDR) +# to /etc/dnsmasq.conf, after which 'container1.lxc' will resolve on your +# host. +#LXC_DOMAIN="lxc"