.git broken, restart
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=watch connections
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/bin/bash /etc/systemd/system/tcpd.sh
|
||||
After=tcpd-bkup.service
|
||||
Type=simple
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
Executable
+10
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
. /etc/env
|
||||
|
||||
mkdir -p $LOG_CONN_DIR
|
||||
tcpdump -n -l > $LOG_CONN
|
||||
|
||||
exit 0
|
||||
|
||||
|
||||
Executable
+21
@@ -0,0 +1,21 @@
|
||||
#!/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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user