mirror of
https://github.com/teddysun/across.git
synced 2025-04-22 20:09:32 +08:00
Merge branch 'master' of https://github.com/ddv12138/across
This commit is contained in:
commit
1957857a1b
1
backup-seafile-here.sh
Executable file
1
backup-seafile-here.sh
Executable file
@ -0,0 +1 @@
|
||||
rsync -vzrtopg --progress -e ssh --delete root@pineapple.cf:/opt/seafile-data/* /seafile-backup/
|
9
initseafile.sh
Normal file
9
initseafile.sh
Normal file
@ -0,0 +1,9 @@
|
||||
docker run -d --name seafile \
|
||||
-e SEAFILE_SERVER_LETSENCRYPT=true \
|
||||
-e SEAFILE_SERVER_HOSTNAME=proxy.ddvudo.cf \
|
||||
-e SEAFILE_ADMIN_EMAIL=644077730@qq.com \
|
||||
-e SEAFILE_ADMIN_PASSWORD=liukang951006 \
|
||||
-v /seafile-data:/shared \
|
||||
-p 80:80 \
|
||||
-p 443:443 \
|
||||
seafileltd/seafile:latest
|
13
secure_ssh.sh
Executable file
13
secure_ssh.sh
Executable file
@ -0,0 +1,13 @@
|
||||
#! /bin/bash
|
||||
cat /var/log/secure|awk '/Failed/{print $(NF-3)}'|sort|uniq -c|awk '{print $2"="$1;}' > /usr/local/bin/black.list
|
||||
for i in `cat /usr/local/bin/black.list`
|
||||
do
|
||||
IP=`echo $i |awk -F= '{print $1}'`
|
||||
NUM=`echo $i|awk -F= '{print $2}'`
|
||||
if [ ${#NUM} -gt 1 ]; then
|
||||
grep $IP /etc/hosts.deny > /dev/null
|
||||
if [ $? -gt 0 ];then
|
||||
echo "sshd:$IP:deny" >> /etc/hosts.deny
|
||||
fi
|
||||
fi
|
||||
done
|
Loading…
x
Reference in New Issue
Block a user