Updated log.in (added logwatch).
authorZoltán Felleg <zoltan.felleg@userrendszerhaz.hu>
Tue, 28 Jan 2025 12:59:24 +0000 (13:59 +0100)
committerZoltán Felleg <zoltan.felleg@userrendszerhaz.hu>
Tue, 28 Jan 2025 12:59:24 +0000 (13:59 +0100)
sources/log.in/c3d/firstboot/scripts/90_setupservices.sh [new file with mode: 0755]
sources/log.in/c3d/postinstall/install-data/etc/logwatch/conf/logfiles/letsencrypt.conf [new file with mode: 0644]
sources/log.in/c3d/postinstall/install-data/etc/logwatch/conf/logwatch.conf [new file with mode: 0644]
sources/log.in/c3d/postinstall/install-data/etc/logwatch/conf/services/letsencrypt.conf [new file with mode: 0644]
sources/log.in/c3d/postinstall/install-data/etc/logwatch/scripts/services/letsencrypt [new file with mode: 0644]
sources/log.in/c3d/postinstall/install-data/etc/rsyslog.d/remote.conf
sources/log.in/c3d/postinstall/scripts/10_setupservices.sh
sources/log.in/envvars

diff --git a/sources/log.in/c3d/firstboot/scripts/90_setupservices.sh b/sources/log.in/c3d/firstboot/scripts/90_setupservices.sh
new file mode 100755 (executable)
index 0000000..be4e8a6
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+
+systemctl enable NetworkManager-wait-online.service
+systemctl start NetworkManager-wait-online.service
+systemctl enable crond.service
+systemctl start crond.service
+systemctl enable postfix.service
+systemctl start postfix.service
+
+systemctl enable logrotate.timer
+systemctl start logrotate.timer
diff --git a/sources/log.in/c3d/postinstall/install-data/etc/logwatch/conf/logfiles/letsencrypt.conf b/sources/log.in/c3d/postinstall/install-data/etc/logwatch/conf/logfiles/letsencrypt.conf
new file mode 100644 (file)
index 0000000..fb94704
--- /dev/null
@@ -0,0 +1,24 @@
+##########################################################################
+# $Id$
+##########################################################################
+
+########################################################
+# This was written and is maintained by:
+#    Kirk Bauer <kirk@kaybee.org>
+#
+# Please send all comments, suggestions, bug reports,
+#    etc, to kirk@kaybee.org.
+########################################################
+
+# What actual file?  Defaults to LogPath if not absolute path....
+LogFile = remote/pki.log
+
+# If the archives are searched, here is one or more line
+# (optionally containing wildcards) that tell where they are...
+#If you use a "-" in naming add that as well -mgt
+Archive = remote/pki.log-*.gz
+
+# Keep only the lines in the proper date range...
+*ApplyStdDate
+
+# vi: shiftwidth=3 tabstop=3 et
diff --git a/sources/log.in/c3d/postinstall/install-data/etc/logwatch/conf/logwatch.conf b/sources/log.in/c3d/postinstall/install-data/etc/logwatch/conf/logwatch.conf
new file mode 100644 (file)
index 0000000..e680a98
--- /dev/null
@@ -0,0 +1,7 @@
+# Local configuration options go here (defaults are in /usr/share/logwatch/default.conf/logwatch.conf)
+Output = mail
+MailTo = siteadmin@useribm.hu
+MailFrom = logwatch@useribm.hu
+Service = "-postfix"
+Service = "-rsyslogd"
+Service = "-systemd"
diff --git a/sources/log.in/c3d/postinstall/install-data/etc/logwatch/conf/services/letsencrypt.conf b/sources/log.in/c3d/postinstall/install-data/etc/logwatch/conf/services/letsencrypt.conf
new file mode 100644 (file)
index 0000000..5583d74
--- /dev/null
@@ -0,0 +1,25 @@
+###########################################################################
+# ------------------------------------------------------------------------
+###########################################################################
+
+# You can put comments anywhere you want to.  They are effective for the
+# rest of the line.
+
+# this is in the format of <name> = <value>.  Whitespace at the beginning
+# and end of the lines is removed.  Whitespace before and after the = sign
+# is removed.  Everything is case *insensitive*.
+
+# Yes = True  = On  = 1
+# No  = False = Off = 0
+
+Title = "Letsencrypt"
+
+# Which logfile group...
+LogFile = letsencrypt
+
+# Only give lines pertaining to letsencrypt (certbot)
+*OnlyService = certbot
+
+*RemoveHeaders =
+
+# vi: shiftwidth=3 tabstop=3 et
diff --git a/sources/log.in/c3d/postinstall/install-data/etc/logwatch/scripts/services/letsencrypt b/sources/log.in/c3d/postinstall/install-data/etc/logwatch/scripts/services/letsencrypt
new file mode 100644 (file)
index 0000000..7d818f3
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+
+# This is as nice script that will show you the lines you will
+# be processing and reporting on.  It will first display the
+# standard environment variables and then it takes STDIN and
+# dump it right back out to STDOUT.
+
+# These are the standard environment variables.  You can define
+# more in your service config file (see above).
+#echo "Date Range: $LOGWATCH_DATE_RANGE"
+#echo "Detail Level: $LOGWATCH_DETAIL_LEVEL"
+#echo "Temp Dir: $LOGWATCH_TEMP_DIR"
+#echo "Debug Level: $LOGWATCH_DEBUG"
+
+# Now take STDIN and dump it to STDOUT
+#cat
+
+
+grep -e '(skipped)' -e '(success)' | sort | uniq
index dc14500e696d3baf4ac393692d1e9ac1e1be28a2..00a9f14a86216b3b1c1c25283705d473cba40e56 100644 (file)
@@ -4,6 +4,7 @@ template(name="remoteTemplate" type="list") {
     constant(value=".log")
 }
 
+module(load="imrelp")
 module(load="imtcp")
 module(load="imudp")
 
@@ -11,5 +12,6 @@ ruleset(name="remoteRuleset"){
      *.*   action(type="omfile" DynaFile="remoteTemplate")
 }
 
+input(type="imrelp" port="2514" ruleset="remoteRuleset")
 input(type="imtcp" port="514" ruleset="remoteRuleset")
 input(type="imudp" port="514" ruleset="remoteRuleset")
index 706332a2d7ef1340d38067a790eea30c22cf065a..4e4d9237aa9f86469f4db4c09740de62cf874d7c 100755 (executable)
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 
-systemctl enable NetworkManager-wait-online.service
+systemctl disable crond.service
+systemctl disable postfix.service
+systemctl disable NetworkManager-wait-online.service
 
-systemctl enable logrotate.timer
+systemctl disable logrotate.timer
index 2a37b076a33f4f799742e325ae85f717651c5e81..b4117033b581e20996315574ec5d90bf859561a0 100644 (file)
@@ -1,3 +1,5 @@
 DISTRIBUTION=Fedora
 DISTRIBUTION_VERSION=41
-SPEC_PACKAGES="rsyslog-doc"
+SPEC_PACKAGES="logwatch \
+               postfix \
+               rsyslog-doc"