Files
svr/usr/etc/systemd/system/tcpd_bkup.sh
T

22 lines
299 B
Bash
Raw Normal View History

2026-01-23 08:55:18 +01:00
#!/usr/bin/bash
#run from crontab
. /home/.bashrc
. refresh_time
STATUS=ronron
if [ -f $NET_STATUS ] ; then
STATUS=$(cat $NET_STATUS)
fi
DIR=$LOG_CONN_DIR/$STATUS
mkdir -p $DIR
grepip $LOG_CONN > $DIR/${DATE}_${TIME}.conn
mv -f $LOG_CONN $LOG_CONN_DIR/prev.log
systemctl restart tcpd
exit 0