generated from pavel.muhortov/template-python
updated dependencies
This commit is contained in:
parent
6b4b636010
commit
4ee7920d42
12
README.md
12
README.md
|
@ -4,7 +4,6 @@ Route manager by CIDR lists
|
||||||
|
|
||||||
* [`my_route`.py](https://git.hmp.today/pavel.muhortov/my_route#my_route-py)
|
* [`my_route`.py](https://git.hmp.today/pavel.muhortov/my_route#my_route-py)
|
||||||
|
|
||||||
|
|
||||||
____
|
____
|
||||||
|
|
||||||
## `my_route`.py
|
## `my_route`.py
|
||||||
|
@ -16,6 +15,7 @@ ____
|
||||||
>
|
>
|
||||||
> * privileged rights
|
> * privileged rights
|
||||||
> * [Python 3](https://www.python.org/downloads/) (tested version 3.9.5 on [Debian GNU/Linux 11](http://ftp.debian.org/debian/dists/bullseye/))
|
> * [Python 3](https://www.python.org/downloads/) (tested version 3.9.5 on [Debian GNU/Linux 11](http://ftp.debian.org/debian/dists/bullseye/))
|
||||||
|
> * [git](https://git-scm.com/) (tested version 2.30.2 on [Debian GNU/Linux 11](http://ftp.debian.org/debian/dists/bullseye/))
|
||||||
|
|
||||||
| PARAMETERS | DESCRIPTION | DEFAULT|
|
| PARAMETERS | DESCRIPTION | DEFAULT|
|
||||||
|-------------|-------------|--------|
|
|-------------|-------------|--------|
|
||||||
|
@ -27,22 +27,22 @@ ____
|
||||||
|**[-u, --update]**|update cidr file db|`False`|
|
|**[-u, --update]**|update cidr file db|`False`|
|
||||||
|**[-f, --force]**|force download sources for update|`False`|
|
|**[-f, --force]**|force download sources for update|`False`|
|
||||||
|
|
||||||
Example usage:
|
### Example usage my_route.py
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# download
|
# download my_route.py
|
||||||
sudo wget https://git.hmp.today/pavel.muhortov/my_route/raw/branch/master/my_route.py -O /usr/local/bin/my_route.py
|
sudo wget https://git.hmp.today/pavel.muhortov/my_route/raw/branch/master/my_route.py -O /usr/local/bin/my_route.py
|
||||||
sudo chmod +x /usr/local/bin/my_route.py
|
sudo chmod +x /usr/local/bin/my_route.py
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# download and edit config file
|
# download and edit my_route.conf
|
||||||
sudo wget https://git.hmp.today/pavel.muhortov/my_route/raw/branch/master/my_route.conf -O /usr/local/bin/my_route.conf
|
sudo wget https://git.hmp.today/pavel.muhortov/my_route/raw/branch/master/my_route.conf -O /usr/local/bin/my_route.conf
|
||||||
sudo nano /usr/local/bin/my_route.conf
|
sudo nano /usr/local/bin/my_route.conf
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# create and edit cidr file or update by sources
|
# create and edit cidr files or update by sources
|
||||||
sudo mkdir /usr/local/bin/my_route.db
|
sudo mkdir /usr/local/bin/my_route.db
|
||||||
sudo tee /usr/local/bin/my_route.db/sources/custom.cidr > /dev/null <<'EOF'
|
sudo tee /usr/local/bin/my_route.db/sources/custom.cidr > /dev/null <<'EOF'
|
||||||
34.117.59.81/32 # ipinfo.io
|
34.117.59.81/32 # ipinfo.io
|
||||||
|
@ -51,5 +51,5 @@ EOF
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# sudo crontab -e
|
# sudo crontab -e
|
||||||
0 0 * * * /usr/bin/python3 /usr/local/bin/my_route.py --update
|
0 0 * * * /usr/bin/python3 /usr/local/bin/my_route.py --update --force
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue
Block a user