rebasing .git

This commit is contained in:
journal_froid
2026-01-23 09:59:19 +01:00
parent 199b9429ad
commit 1d4435089f
60 changed files with 382 additions and 154 deletions
-1
View File
@@ -4,7 +4,6 @@ After=network-online.target
[Service]
ExecStart=/bin/bash /etc/systemd/system/tcpd.sh
After=tcpd-bkup.service
Type=simple
[Install]
+11
View File
@@ -0,0 +1,11 @@
[Unit]
Description=backups tcpd log file, keeping ip adresses only
[Service]
ExecStart=/bin/bash /etc/systemd/system/tcpd_bkup.sh
Restart=on-failure
RestartSec=121s
Type=oneshot
[Install]
WantedBy=multi-user.target
+9 -8
View File
@@ -1,21 +1,22 @@
#!/usr/bin/bash
#!/bin/bash
#run from crontab
. /home/.bashrc
[ -f "$LOG_CONN" ] || exit 0
. refresh_time
STATUS=ronron
STATUS=network.conns
if [ -f $NET_STATUS ] ; then
STATUS=$(cat $NET_STATUS)
fi
DIR=$LOG_CONN_DIR/$STATUS
DIR="$LOG_CONN_DIR/$STATUS"
mkdir -p $DIR
grepip $LOG_CONN > $DIR/${DATE}_${TIME}.conn
mv -f $LOG_CONN $LOG_CONN_DIR/prev.log
grepip "$LOG_CONN" > "$DIR/${DATE}_${TIME}.conn"
mv -f "$LOG_CONN" "$LOG_CONN_DIR/prev.log"
systemctl restart tcpd
exit 0
+10
View File
@@ -0,0 +1,10 @@
[Unit]
Description=Run tcpd_bkup.service every 2 minutes
[Timer]
OnBootSec=2min
OnUnitActiveSec=2min
Persistent=true
[Install]
WantedBy=timers.target