From 7947c42dd7fa7fa98ea2156058f37e13e5b113bc Mon Sep 17 00:00:00 2001 From: aixiao Date: Mon, 13 Jan 2025 15:57:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AE=89=E8=A3=85=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- denyip | Bin 9880728 -> 9880736 bytes install.sh | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 install.sh diff --git a/denyip b/denyip index 7e996e690498974a0a59ee8bb5d5402c3eb171be..7da3c3fafbbb8c6faa808cc13dede0966e790e43 100644 GIT binary patch delta 1033 zcmbW$Ia52)l}iY;FV>1Qn8d$wCl_A%q0w}~46(!;Ziso2S zSXjz9BMn7Fdv&NB8)xj9p|h~?z2i5qc;=nooa$ek*YiL0%UCSX8CD7xVrP;v%6t49 znMr}F_sXw?FLBEo!5FDJ0?j=Y1gzpSQ~P?J-)NfZh!Y!iPIRYQ%8m-t$}vS znCcI^3#Uj^t)`dpYhUsBvi?PksIvg4t7_q3Kng+ACNeML8OUA&U z*J?J-+Vo+YUWXXOLfdhOM*(8@6KyQn3?h*oAcLMg}sGg>2+t5B6do_TvC@ zVL%=Z;t&qw2=Z|h1t`QZ9LEV1p%_M(AVWb3%&@=;8%kkE8BU@c6{v&*r{F{tT&P~P z>D_4+1-?FWpU+!rw)qs*VpTkTui95)FY)<37K_bhlIDei zh;d9{5?62)Qd!Y_u8FwzL!o`E$gP9RDH0PnM+Y7$Fb$r;F4ccgkO|-HP1+ delta 1044 zcmbW$$xl;J6vy!v>QJ0#aDd`~pqBQPzV;P?(t)8>5u`XEihUiRf`U>k;DB?%S#d)@d}FR%ElGPowE2b&F9r0#Q!s{3cJ1ljBrhTXTy=K2GOTM)4swyL=V3k;U?KF#!y+uk5-i0sEXNA0#44=D8mz@Sl*g356(v0mayiE!c`}D8Y7=q6|B*6T4tUIZQA^f&~?@LWT`?C~%+>yHSN|)WC^a zxZs8d-YL7TZbfyeqy$wt7_mm8a>No*6mwWo%@J!*u|?HTg-s0xBXZOlmPNm-t{_hd zn3YPiRB2X3Q+Jm!nQ_&j9t~)O4}R>yUhG2?_M;gsIDl3J(1wFJgu^(3b{s_qj^Q{u zaRNc82qBCJqEi`Hm#5^vXGt;(x~H1DV~scUN|`~jmRrir6UDg&6X|)n16w zJj5eR;PKS-?314}+CuRrld@||#at%k)HVvo8{)7S&c-M4DjVO#TsEEy$J>-M=f^WK z@-|hIZBlBR#oXU;yh}OtW0NWVsYc@yFa4Gxk$#uT*U$VrGYV;;r6{{9@jC5UtxbzL Su4oOyG0n5TC&kEgs^kwgu9UO@ diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..e767d96 --- /dev/null +++ b/install.sh @@ -0,0 +1,46 @@ +#!/bin/bash +set -x + +init() +{ + DENYIP_HOME=~/DenyIp-go + +} + +main() +{ + if ! test -d $DENYIP_HOME; then + mkdir -p $DENYIP_HOME + mkdir -p $DENYIP_HOME/ip2region + fi + + if ! test -f ~/DenyIp/ip2region/ip2region.xdb; then + wget -O $DENYIP_HOME/ip2region/ip2region.xdb https://git.aixiao.me/aixiao/DenyIP-go/raw/branch/main/ip2region/ip2region.xdb + + if test "$(md5sum $DENYIP_HOME/ip2region/ip2region.xdb | cut -d " " -f 1)" != "508c6b0257a02152b9d1b2b3792936e1"; then + echo "ip2region.xdb md5 check fail" + rm -rf $DENYIP_HOME + exit 1 + else + echo "ip2region.xdb md5 check success" + fi + fi + + if ! test -f ~/DenyIp/denyip; then + wget -O $DENYIP_HOME/denyip https://git.aixiao.me/aixiao/DenyIP-go/raw/branch/main/denyip + chmod +x $DENYIP_HOME/denyip + + if test -n "$(file $DENYIP_HOME/denyip | grep ELF)"; then + echo "denyip install success" + else + echo "denyip install fail" + rm -rf $DENYIP_HOME + exit 1 + fi + fi + +} + +init +main $@ +exit 0