Updated chostb.in (added rsync logging to log server).
authorZoltán Felleg <zoltan.felleg@userrendszerhaz.hu>
Thu, 14 Nov 2024 16:13:21 +0000 (17:13 +0100)
committerZoltán Felleg <zoltan.felleg@userrendszerhaz.hu>
Thu, 14 Nov 2024 16:13:21 +0000 (17:13 +0100)
sources/chostb.in/99_setupsystem.sh
sources/chostb.in/etc/logrotate.d/rsync [new file with mode: 0644]
sources/chostb.in/etc/rsyslog.d/remote.conf [new file with mode: 0644]
sources/chostb.in/etc/sysconfig/lxc [new file with mode: 0644]
sources/chostb.in/etc/sysconfig/lxc-net [new file with mode: 0644]

index 6b24b09bb1fedb696f32defe3d6093f061eac453..61ab9d577fc5644b7aae3093b561197883213c5a 100755 (executable)
@@ -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 (file)
index 0000000..370e4e5
--- /dev/null
@@ -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 (file)
index 0000000..b645851
--- /dev/null
@@ -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 (file)
index 0000000..d184fa0
--- /dev/null
@@ -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 (file)
index 0000000..501c12e
--- /dev/null
@@ -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/<container>/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"