2017年 11月 25日 星期六 14:10:23 CST

This commit is contained in:
ddv12138 2018-05-26 15:44:45 +08:00
parent 0ddfc695d3
commit b1eb4faec5
3 changed files with 23 additions and 0 deletions

1
backup-seafile-here.sh Executable file
View File

@ -0,0 +1 @@
rsync -vzrtopg --progress -e ssh --delete root@pineapple.cf:/opt/seafile-data/* /seafile-backup/

9
initseafile.sh Normal file
View 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
View 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